remove redundantness
This commit is contained in:
parent
6071fb5e88
commit
4b0c2bb1f5
@ -27,19 +27,13 @@ class Downtime implements Extension {
|
|||||||
|
|
||||||
if($event instanceof PageRequestEvent) {
|
if($event instanceof PageRequestEvent) {
|
||||||
if($config->get_bool("downtime")) {
|
if($config->get_bool("downtime")) {
|
||||||
$this->check_downtime($event);
|
if(!$user->is_admin() && !$this->is_safe_page($event)) {
|
||||||
$this->theme->display_notification($page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function check_downtime(PageRequestEvent $event) {
|
|
||||||
global $user, $config;
|
|
||||||
|
|
||||||
if($config->get_bool("downtime") && !$user->is_admin() &&
|
|
||||||
($event instanceof PageRequestEvent) && !$this->is_safe_page($event)) {
|
|
||||||
$msg = $config->get_string("downtime_message");
|
$msg = $config->get_string("downtime_message");
|
||||||
$this->theme->display_message($msg);
|
$this->theme->display_message($msg);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$this->theme->display_notification($page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ class DowntimeTheme extends Themelet {
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
EOD;
|
EOD;
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user