|
@ -10,6 +10,11 @@ $requestUrl = trim(str_replace($_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_U |
|
|
if (preg_match(REQUEST_REGEX, $requestUrl, $match)) { |
|
|
if (preg_match(REQUEST_REGEX, $requestUrl, $match)) { |
|
|
$requestSupplier = array_key_exists('supplier', $match) ? $match['supplier'] : null; |
|
|
$requestSupplier = array_key_exists('supplier', $match) ? $match['supplier'] : null; |
|
|
$requestEvent = array_key_exists('event', $match) ? $match['event'] : null; |
|
|
$requestEvent = array_key_exists('event', $match) ? $match['event'] : null; |
|
|
|
|
|
|
|
|
|
|
|
if (!is_null($requestEvent)) |
|
|
|
|
|
$requestUrl = rtrim(str_replace($requestEvent, '', $requestUrl), '/'); |
|
|
|
|
|
if (!is_null($requestSupplier)) |
|
|
|
|
|
$requestUrl = rtrim(str_replace($requestSupplier, '', $requestUrl), '/'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function generateUrl($supplier = null, $event = null) { |
|
|
function generateUrl($supplier = null, $event = null) { |
|
|