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'); } } }