From 53c108c1b7837043f165a13e97bbf35707287d9e Mon Sep 17 00:00:00 2001 From: vince Date: Thu, 23 Dec 2021 22:00:48 +0100 Subject: [PATCH] corrige la gestion de l'adresse web de base --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index d4b776c..fcbe41a 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,11 @@ $requestUrl = trim(str_replace($_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_U if (preg_match(REQUEST_REGEX, $requestUrl, $match)) { $requestSupplier = array_key_exists('supplier', $match) ? $match['supplier'] : 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) {