From 467d7b2b8bacd0cea0b6fb310d80b342e39d1c7b Mon Sep 17 00:00:00 2001 From: Linux User Date: Thu, 30 Jun 2011 14:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2,=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D0=BB=D0=B0=D1=82=D0=BA=D0=B0=20=D0=B4=D1=8B?= =?UTF-8?q?=D1=80.=20=D0=9D=D1=83=D0=B6=D0=BD=D0=BE=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D1=83=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/classes/controller/page.php | 2 +- application/views/navigation/actions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/classes/controller/page.php b/application/classes/controller/page.php index 85fcdef..1eb7201 100644 --- a/application/classes/controller/page.php +++ b/application/classes/controller/page.php @@ -4,8 +4,8 @@ class Controller_Page extends Controller_Template { public $template = 'page'; public function action_view($id=1) { $page = ORM::factory('page')->where('id', '=', $id)->find(); + if (!$page->loaded()) $this->request->redirect('error/404'); $this->template->title = $page->name; $this->template->content = $page->content; - $this->template->years = "1996-" . date('Y'); } } diff --git a/application/views/navigation/actions.php b/application/views/navigation/actions.php index 86405e7..ffa9e9b 100644 --- a/application/views/navigation/actions.php +++ b/application/views/navigation/actions.php @@ -1,6 +1,6 @@