[*] 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
This commit is contained in:
tDidierjean
2012-03-05 17:02:00 +00:00
parent 5f0cd5ee54
commit fb246e9b4b

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