diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-05 00:32:33 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-05 00:32:33 +0000 |
commit | 7786bb09d32570d9be33727a3fe4fb460fcceeaf (patch) | |
tree | 69cbb683c9a3fc290474536c933a8179d33b51b4 /core/libraries | |
parent | 514e6658f6efc6409cfcf2fa85f0566d80217bad (diff) |
Implement a Maintenance mode as per ticket: #15
Diffstat (limited to 'core/libraries')
-rw-r--r-- | core/libraries/Theme_View.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/libraries/Theme_View.php b/core/libraries/Theme_View.php index 1f8ca559..ea2a17f9 100644 --- a/core/libraries/Theme_View.php +++ b/core/libraries/Theme_View.php @@ -39,6 +39,14 @@ class Theme_View_Core extends View { $this->set_global('theme', $this); $this->set_global('user', user::active()); $this->set_global("page_type", $page_type); + + $maintenance_mode = Kohana::config("core.maintenance_mode", false, false); + if (!empty($maintenance_mode)) { + $album = ORM::factory("item", 1); + message::warning(t("%title is currently unavailable as it is undergoing maintenance", + array("title" => $album->title))); + } + } public function url($path, $absolute_url=false) { |