From fb246e9b4bb20bc1e7e2b62e540fca69aae753ea Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Mon, 5 Mar 2012 17:02:00 +0000 Subject: [PATCH] [*] Classes : #PSTEST-951 - controller filename in module can now use any case and use or not "Controller" suffix git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13858 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Dispatcher.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php index dac4966d7..4f417c341 100644 --- a/classes/Dispatcher.php +++ b/classes/Dispatcher.php @@ -289,8 +289,9 @@ class DispatcherCore } else { - include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$this->controller.'.php'); - $controller_class = $controllers[$this->controller].'Controller'; + // Controllers in modules can be named AdminXXX.php or AdminXXXController.php + include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$controllers[$this->controller].'.php'); + $controller_class = $controllers[$this->controller].(strpos($controllers[$this->controller], 'Controller') ? '' : 'Controller'); } } }