Commit a30d3c51 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Rename $CFG->siteclosed to $CFG->siteclosedforupgrade"

parents b892580c 1404fe80
......@@ -444,7 +444,7 @@ function login_test_all_user_authinstance($username, $password) {
}
// stop right here if the site is closed for any reason
$siteclosedforupgrade = get_config('siteclosed');
$siteclosedforupgrade = get_config('siteclosedforupgrade');
if ($siteclosedforupgrade && get_config('disablelogin')) {
global $SESSION;
$SESSION->add_error_msg(get_string('siteclosedlogindisabled', 'mahara', get_config('wwwroot') . 'admin/upgrade.php'), false);
......
......@@ -1864,7 +1864,7 @@ class LiveUser extends User {
}
function is_site_closed($adminuser) {
$siteclosedforupgrade = get_config('siteclosed');
$siteclosedforupgrade = get_config('siteclosedforupgrade');
if ($siteclosedforupgrade && get_config('disablelogin')) {
global $SESSION;
$SESSION->add_error_msg(get_string('siteclosedlogindisabled', 'mahara', get_config('wwwroot') . 'admin/upgrade.php'), false);
......
......@@ -349,15 +349,15 @@ if (get_config('installed')) {
ensure_upgrade_sanity();
}
$disablelogin = $config->disablelogin;
$cfgsiteclosed = get_config('siteclosed');
$cfgsiteclosed = get_config('siteclosedforupgrade');
if ($upgradeavailable != $cfgsiteclosed) {
set_config('siteclosed', $upgradeavailable);
set_config('siteclosedforupgrade', $upgradeavailable);
set_config('disablelogin', $disablelogin);
}
}
// If we're in the middle of an upgrade, quit the cron now.
$siteclosedforupgrade = get_config('siteclosed');
$siteclosedforupgrade = get_config('siteclosedforupgrade');
if ($siteclosedforupgrade && defined('CRON')) {
exit("Site closed for upgrade.\n");
}
......
......@@ -646,7 +646,7 @@ EOF;
$smarty->assign('RELEASE', get_config('release'));
$smarty->assign('SERIES', get_config('series'));
$smarty->assign('CACHEVERSION', get_config('cacheversion'));
$siteclosedforupgrade = get_config('siteclosed');
$siteclosedforupgrade = get_config('siteclosedforupgrade');
if ($siteclosedforupgrade && get_config('disablelogin')) {
$smarty->assign('SITECLOSED', 'logindisabled');
}
......@@ -755,7 +755,7 @@ EOF;
);
}
$isloginblockvisible = !$USER->is_logged_in() && !(get_config('siteclosed') && get_config('disablelogin'))
$isloginblockvisible = !$USER->is_logged_in() && !(get_config('siteclosedforupgrade') && get_config('disablelogin'))
&& get_config('showloginsideblock');
if ($isloginblockvisible) {
$sideblocks[] = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment