From db4c2798ae7ab88d6745cfc7d8827d636a7d3ba3 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 3 Oct 2022 10:49:52 -0400 Subject: Allow redirection after login (#4654) Before, if you've tried to reach a page without being logged, you'll be automatically redirected to the index page after login. Now, the original page is used after login. Fix #3663 --- lib/Minz/FrontController.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'lib/Minz/FrontController.php') diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php index 80fa5ce96..a5f73b59f 100644 --- a/lib/Minz/FrontController.php +++ b/lib/Minz/FrontController.php @@ -36,7 +36,7 @@ class Minz_FrontController { Minz_Request::init(); - $url = $this->buildUrl(); + $url = Minz_Url::build(); $url['params'] = array_merge ( $url['params'], $_POST @@ -50,24 +50,6 @@ class Minz_FrontController { $this->dispatcher = Minz_Dispatcher::getInstance(); } - /** - * Returns an array representing the URL as passed in the address bar - * @return array URL representation - */ - private function buildUrl() { - $url = array(); - - $url['c'] = $_GET['c'] ?? Minz_Request::defaultControllerName(); - $url['a'] = $_GET['a'] ?? Minz_Request::defaultActionName(); - $url['params'] = $_GET; - - // post-traitement - unset($url['params']['c']); - unset($url['params']['a']); - - return $url; - } - /** * Démarre l'application (lance le dispatcher et renvoie la réponse) */ -- cgit v1.2.3