diff --git a/library/Local/Controller/Plugin/PageRewrite.php b/library/Local/Controller/Plugin/PageRewrite.php index f430a68..169c5af 100644 --- a/library/Local/Controller/Plugin/PageRewrite.php +++ b/library/Local/Controller/Plugin/PageRewrite.php @@ -3,16 +3,22 @@ class Local_Controller_Plugin_PageRewrite extends Katharsis_Controller_Plugin_Ab { public function preController() { + $page = Katharsis_Request::getControllerName(); + + if(substr($page, 0, 5) === 'admin') { + return; + } + $defaultSites = array(); if(isset(Katharsis_Registry::getInstance()->defaults['sites'])){ $defaultSites = explode(", ", Katharsis_Registry::getInstance()->defaults['sites']); } - $page = Katharsis_Request::getControllerName(); - - if(!in_array($page, $defaultSites)) { - Katharsis_Request::setControllerName('page'); - Katharsis_Request::setActionName($page); + if(in_array($page, $defaultSites)) { + return; } + + Katharsis_Request::setControllerName('page'); + Katharsis_Request::setActionName($page); } } \ No newline at end of file