// Fix redirection to index when friendly url are activated #PSFV-488

This commit is contained in:
rMalie
2012-02-13 16:56:28 +00:00
parent 26fb5d668d
commit d8c818cf54
+3 -1
View File
@@ -545,8 +545,10 @@ class DispatcherCore
else if (isset($_POST['controller'])) else if (isset($_POST['controller']))
$_POST[$m[2]] = $m[3]; $_POST[$m[2]] = $m[3];
} }
if (!Validate::isControllerName($controller)) if (!Validate::isControllerName($controller))
$controller = false; $controller = false;
// Use routes ? (for url rewriting) // Use routes ? (for url rewriting)
if ($this->use_routes && !$controller) if ($this->use_routes && !$controller)
{ {
@@ -576,7 +578,7 @@ class DispatcherCore
break; break;
} }
if ($controller == 'index') if ($controller == 'index' || $this->request_uri == '/index.php')
$controller = $this->default_controller; $controller = $this->default_controller;
$this->controller = $controller; $this->controller = $controller;
} }