web: if web stopped, show home page anyway

This commit is contained in:
David Anderson 2016-11-29 12:59:38 -08:00
parent 91b4dcdc37
commit c5a743baf4
2 changed files with 11 additions and 5 deletions

View File

@ -128,7 +128,9 @@ function get_logged_in_user($must_be_logged_in=true) {
global $g_logged_in_user, $got_logged_in_user;
if ($got_logged_in_user) return $g_logged_in_user;
check_web_stopped();
if (web_stopped()) {
return null;
}
$authenticator = null;
if (isset($_COOKIE['auth'])) $authenticator = $_COOKIE['auth'];

View File

@ -49,9 +49,11 @@ function panel_contents() {
function top() {
global $stopped, $master_url, $user;
if ($stopped) {
echo "
<p class=\"lead text-center\">".PROJECT." is temporarily shut down for maintenance.</p>
";
echo '
<p class="lead text-center">'
.tra("%1 is temporarily shut down for maintenance.", PROJECT)
.'</p>
';
}
//panel(null, 'panel_contents');
}
@ -115,7 +117,9 @@ function right() {
panel(tra('News'),
function() {
include("motd.php");
show_news(0, 5);
if (!web_stopped()) {
show_news(0, 5);
}
}
);
}