Browse Source

corrige la gestion de l'adresse web de base

master
vince vince 3 years ago
parent
commit
53c108c1b7
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      index.php

+ 5
- 0
index.php View File

@ -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) {


Loading…
Cancel
Save