[*] Project : Add possibility to use admin controllers in modules

This commit is contained in:
jBreux
2012-01-25 14:12:36 +00:00
parent d7f1fc4b95
commit 1872ecb075
2 changed files with 19 additions and 1 deletions
+7 -1
View File
@@ -342,7 +342,13 @@ class DispatcherCore
// Instantiate controller
try
{
Controller::getController($controller_class)->run();
$controller = Controller::getController($controller_class);
// Controller comes from a module set "module name"
if (!empty($controller_row['module']) && $controller_type == 'controller')
$controller->module = $controller_row['module'];
$controller->run();
}
catch (PrestaShopException $e)
{