1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Handle upgrade better. Issue #149 - No.1

This commit is contained in:
Cameron
2013-03-27 16:26:13 -07:00
parent 75e0344efe
commit e6a30c8037

View File

@@ -336,8 +336,12 @@ class eDispatcher
// dispatch based on rule settings
if(!$className)
{
throw new eException("Invalid controller '".$request->getControllerName()."'");
if($controllerName == 'index') // v2.x upgrade has not been run yet.
{
e107::getRedirect()->redirect(e_ADMIN."admin.php");
}
throw new eException("Invalid controller '".$controllerName."'");
}
$controller = new $className($request, $response);