aboutsummaryrefslogtreecommitdiffstats
path: root/Controller.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mekanisti.fi>2009-11-10 12:46:28 +0200
committerFilipp Lepalaan <filipp@mekanisti.fi>2009-11-10 12:46:28 +0200
commit6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f (patch)
tree4a0b29723bb72c470d312cd6d5e453577a5c8bc1 /Controller.php
parent7034b50d0d50612ca52273aacabd2b3189c968d8 (diff)
downloadmain-6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f.tar.gz
main-6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f.tar.bz2
main-6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f.zip
Fixes, View class
Diffstat (limited to 'Controller.php')
-rw-r--r--Controller.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Controller.php b/Controller.php
index 458d3a3..5e14f4b 100644
--- a/Controller.php
+++ b/Controller.php
@@ -31,7 +31,10 @@ class Controller
if ($id) {
return $this->get($id);
}
+
+ $this->view = new MainView();
return $this;
+
}
/**
@@ -349,8 +352,9 @@ class Controller
$tpl_contents = ob_get_contents();
ob_end_clean();
+ $title = ($this->pageTitle) ? $this->pageTitle : App::conf("defaults.title");
$tpl_contents = preg_replace(
- '/<title>.*?<\/title>/', "<title>{$this->pageTitle}</title>", $tpl_contents
+ '/<title>.*?<\/title>/', "<title>{$title}</title>", $tpl_contents
);
echo str_replace('%%page_content%%', $view_contents, $tpl_contents);