// norm on previous commit

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15360 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2012-05-17 14:26:35 +00:00
parent 53d16fd889
commit c2e4d227d6
+7 -6
View File
@@ -234,6 +234,7 @@ class DispatcherCore
*/ */
public function dispatch() public function dispatch()
{ {
$controller_class = '';
$this->request_uri = preg_replace('#^'.preg_quote(Context::getContext()->shop->getBaseURI(), '#').'#i', '/', $this->request_uri); $this->request_uri = preg_replace('#^'.preg_quote(Context::getContext()->shop->getBaseURI(), '#').'#i', '/', $this->request_uri);
// If there are several languages, get language from uri // If there are several languages, get language from uri
@@ -267,7 +268,7 @@ class DispatcherCore
if (!isset($controllers[$this->controller])) if (!isset($controllers[$this->controller]))
$this->controller = $this->controller_not_found; $this->controller = $this->controller_not_found;
$controller_class = $controllers[$this->controller]; $controller_class = $controllers[$this->controller];
$paramsHookActionDispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 0); $params_hook_action_dispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 0);
break; break;
// Dispatch module controller for front office // Dispatch module controller for front office
@@ -284,7 +285,7 @@ class DispatcherCore
$controller_class = $module_name.$this->controller.'ModuleFrontController'; $controller_class = $module_name.$this->controller.'ModuleFrontController';
} }
} }
$paramsHookActionDispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 1); $params_hook_action_dispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 1);
break; break;
// Dispatch back office controller + module back office controller // Dispatch back office controller + module back office controller
@@ -310,7 +311,7 @@ class DispatcherCore
$controller_class = $controllers[$this->controller].(strpos($controllers[$this->controller], 'Controller') ? '' : 'Controller'); $controller_class = $controllers[$this->controller].(strpos($controllers[$this->controller], 'Controller') ? '' : 'Controller');
} }
} }
$paramsHookActionDispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 1); $params_hook_action_dispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 1);
} }
else else
{ {
@@ -318,7 +319,7 @@ class DispatcherCore
if (!isset($controllers[$this->controller])) if (!isset($controllers[$this->controller]))
$this->controller = $this->controller_not_found; $this->controller = $this->controller_not_found;
$controller_class = $controllers[$this->controller]; $controller_class = $controllers[$this->controller];
$paramsHookActionDispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 0); $params_hook_action_dispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 0);
if (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php')) if (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php'))
$retrocompatibility_admin_tab = _PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php'; $retrocompatibility_admin_tab = _PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php';
@@ -345,8 +346,8 @@ class DispatcherCore
$controller = Controller::getController($controller_class); $controller = Controller::getController($controller_class);
// Execute hook dispatcher // Execute hook dispatcher
if (isset($paramsHookActionDispatcher)) if (isset($params_hook_action_dispatcher))
Hook::exec('actionDispatcher', $paramsHookActionDispatcher); Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
// Running controller // Running controller
$controller->run(); $controller->run();