From 918a6ad9e83a7f78660ca4c92391fcd9709bd533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Thu, 17 Oct 2024 21:13:24 +0200 Subject: [PATCH] init --- .htaccess | 8 ++++++++ core/module/user/user.php | 28 ++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.htaccess b/.htaccess index 826eb7c..1dacf86 100644 --- a/.htaccess +++ b/.htaccess @@ -41,4 +41,12 @@ Options -Indexes # ne pas supprimer la ligne URL rewriting ! # URL rewriting + + RewriteEngine on + RewriteBase /ZwiiCampus/ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php?$1 [L] + +# URL rewriting diff --git a/core/module/user/user.php b/core/module/user/user.php index 7086742..d7f7296 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -1151,12 +1151,12 @@ class user extends common // Exclure les espaces des cours /* - foreach (array_keys($this->getData(['course'])) as $courseId) { - self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) { - return strpos($key, $courseId) === false; - }); - } - */ + foreach (array_keys($this->getData(['course'])) as $courseId) { + self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) { + return strpos($key, $courseId) === false; + }); + } + */ self::$sharePath = array_flip(self::$sharePath); self::$sharePath = array_merge(['none' => 'Aucun Accès'], self::$sharePath); @@ -1415,8 +1415,20 @@ class user extends common public function autologin() { - var_dump($_GET); - die(); + // Récupère l'URL complète + $url = $_SERVER['REQUEST_URI']; + + // Extrait la partie après le "?" dans l'URL + $parsedUrl = parse_url($url); + if (isset($parsedUrl['query'])) { + // Analyse les paramètres à la main + parse_str($parsedUrl['query'], $params); + + // Affiche les paramètres + var_dump($params); + } else { + echo "Aucun paramètre trouvé dans l'URL."; + } } /**