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

This commit is contained in:
tDidierjean
2012-03-05 17:02:00 +00:00
parent d8a390a16f
commit c93f92720e
+3 -2
View File
@@ -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');
}
}
}