From f219e199e9b5050e5f6996afe4f811b0bfffaa61 Mon Sep 17 00:00:00 2001 From: shish Date: Sat, 21 Apr 2007 13:55:11 +0000 Subject: [PATCH] make a big 'downtime mode is on' notice git-svn-id: file:///home/shish/svn/shimmie2/trunk@5 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/downtime.ext.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/downtime.ext.php b/ext/downtime.ext.php index 6a4edaea..fd707005 100644 --- a/ext/downtime.ext.php +++ b/ext/downtime.ext.php @@ -17,6 +17,14 @@ class Downtime extends Extension { $event->config->set_bool("downtime", $_POST['downtime']); $event->config->set_string("downtime_message", $_POST['downtime_message']); } + if(is_a($event, 'PageRequestEvent')) { + global $config; + if($config->get_bool("downtime")) { + global $page; + + $page->add_side_block(new Block("Downtime", "DOWNTIME MODE IS ON!"), 0); + } + } } // }}} // do things {{{