[*] Classes : #PSTEST-951 - controller filename in module can now use any case and use or not "Controller" suffix

This commit is contained in:
tDidierjean committed 2012-03-05 17:02:00 +00:00
1 parent d8a390a16f
commit c93f92720e
1 file changed
+3 -2
+3 -2
View File
@@ -289,8 +289,9 @@ class DispatcherCore
} }
else else
{ {
include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$this->controller.'.php'); // Controllers in modules can be named AdminXXX.php or AdminXXXController.php
$controller_class = $controllers[$this->controller].'Controller'; include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$controllers[$this->controller].'.php');
$controller_class = $controllers[$this->controller].(strpos($controllers[$this->controller], 'Controller') ? '' : 'Controller');
} }
} }
} }