// refacto for last commit c7aa92f3b3

This commit is contained in:
gRoussac
2013-05-15 11:47:46 +02:00
parent be977a5f17
commit 79c1d7d0f0
+2 -3
View File
@@ -670,7 +670,7 @@ class DispatcherCore
$controller = false; $controller = false;
// Use routes ? (for url rewriting) // Use routes ? (for url rewriting)
if ($this->use_routes && !$controller) if ($this->use_routes && !$controller && !defined('_PS_ADMIN_DIR_'))
{ {
if (!$this->request_uri) if (!$this->request_uri)
return strtolower($this->controller_not_found); return strtolower($this->controller_not_found);
@@ -711,8 +711,7 @@ class DispatcherCore
} }
} }
$request_uri = str_replace(str_replace(realpath(dirname(_PS_ADMIN_DIR_)), '', _PS_ADMIN_DIR_).DIRECTORY_SEPARATOR, '', $this->request_uri); if ($controller == 'index' || $this->request_uri == '/index.php')
if (in_array($controller, array('index', 'adminnotfound')) || in_array($request_uri, array('', 'index', 'index.php')))
$controller = $this->default_controller; $controller = $this->default_controller;
$this->controller = $controller; $this->controller = $controller;
} }