Implement a Maintenance mode as per ticket: #15

This commit is contained in:
Tim Almdal
2009-03-05 00:32:33 +00:00
parent 514e6658f6
commit 7786bb09d3
6 changed files with 132 additions and 0 deletions

View File

@@ -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) {