From c6df341c6811547335a6d5146de4e93e016d8d5a Mon Sep 17 00:00:00 2001 From: akulikov Date: Tue, 16 Dec 2008 12:47:17 +0000 Subject: [PATCH] Bid history refresh added (by ajax)/ Ajax root class added git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@27 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/PageController.class.php | 11 ++++++----- classes/Router.class.php | 30 ++++++++++++++++++------------ 2 files changed, 24 insertions(+), 17 deletions(-) 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;