From 6ce2a6c65c9c9eba1e7660d151b6a709ecfa625f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 10 Nov 2009 12:46:28 +0200 Subject: Fixes, View class --- Controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Controller.php') 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>{$this->pageTitle}", $tpl_contents + '/.*?<\/title>/', "<title>{$title}", $tpl_contents ); echo str_replace('%%page_content%%', $view_contents, $tpl_contents); -- cgit v1.2.3