diff --git a/classes/PageController.class.php b/classes/PageController.class.php index 287cd89..371ef11 100644 --- a/classes/PageController.class.php +++ b/classes/PageController.class.php @@ -1,12 +1,12 @@ route = Load::router()->proccess(MJ_PATH); + $action = new $this->route->action; $decorator = new $this->route->decorator; - return $decorator->display(new $this->route->action); + return $decorator->display($action); } catch (MJException $e) { return $e->terminate(); } catch (Exception $e) { diff --git a/classes/Router.class.php b/classes/Router.class.php index ba3c256..5ad0638 100644 --- a/classes/Router.class.php +++ b/classes/Router.class.php @@ -1,24 +1,24 @@ routes as $name => $route) { if ($route->match($path)) { $route->action .= ACTION_POSTFIX; @@ -66,17 +72,17 @@ final class Router } throw new Exception(E_404); } - + static public function setRewriteBase($value = '') { self::$rewrite_base = $value; } - + static public function getRewriteBase() { return self::$rewrite_base; } - + static public function setDefaultDecorator($decorator) { self::$decorator = $decorator.DECORATOR_POSTFIX;