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
This commit is contained in:
akulikov
2008-12-16 12:47:17 +00:00
parent 8ca069e4c2
commit c6df341c68
2 changed files with 24 additions and 17 deletions

View File

@ -21,8 +21,9 @@ final class PageController
{ {
try { try {
$this->route = Load::router()->proccess(MJ_PATH); $this->route = Load::router()->proccess(MJ_PATH);
$action = new $this->route->action;
$decorator = new $this->route->decorator; $decorator = new $this->route->decorator;
return $decorator->display(new $this->route->action); return $decorator->display($action);
} catch (MJException $e) { } catch (MJException $e) {
return $e->terminate(); return $e->terminate();
} catch (Exception $e) { } catch (Exception $e) {

View File

@ -55,7 +55,13 @@ final class Router
*/ */
function proccess($path) function proccess($path)
{ {
$path = explode('/', ltrim($path, self::getRewriteBase())); if ($trim = self::getRewriteBase()) {
if (substr($path, 0 , strlen($trim)) == $trim) {
$path = substr($path, strlen($trim));
}
}
$path = explode('/', $path);
foreach($this->routes as $name => $route) { foreach($this->routes as $name => $route) {
if ($route->match($path)) { if ($route->match($path)) {