From 684f6a700901154c3a0faea73591eda7ceeff4c7 Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 7 Feb 2012 10:52:01 +0000 Subject: [PATCH] // Fix modules front controller in dispatcher #PSFV-449 --- classes/Dispatcher.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php index 5c19473f4..85bb8d3b5 100644 --- a/classes/Dispatcher.php +++ b/classes/Dispatcher.php @@ -562,10 +562,17 @@ class DispatcherCore if (preg_match($route['regexp'], $this->request_uri, $m)) { // Route found ! Now fill $_GET with parameters of uri - $controller = $route['controller']; foreach ($m as $k => $v) if (!is_numeric($k)) $_GET[$k] = $v; + + $controller = $route['controller'] ? $route['controller'] : $_GET['controller']; + if (!empty($route['params'])) + foreach ($route['params'] as $k => $v) + $_GET[$k] = $v; + + if (isset($_GET['fc']) && $_GET['fc'] == 'module') + $this->front_controller = self::FC_MODULE; break; }