Commit 9020e343 authored by Richard Mansfield's avatar Richard Mansfield

Add checking for local upgrades

parent e7ae4a45
......@@ -339,12 +339,19 @@ function auth_setup () {
// Lock the site until core upgrades are done
require(get_config('libroot') . 'version.php');
$siteclosed = $config->version > get_config('version');
$disablelogin = $config->disablelogin;
if (!$siteclosed && get_config('forcelocalupgrades')) {
require(get_config('docroot') . 'local/version.php');
$siteclosed = $config->version > get_config('localversion');
}
$cfgsiteclosed = get_config('siteclosed');
if (
($siteclosed && !$cfgsiteclosed)
|| (!$siteclosed && $cfgsiteclosed)) {
set_config('siteclosed', $siteclosed);
if ($config->disablelogin && $siteclosed) {
if ($disablelogin && $siteclosed) {
set_config('disablelogin', 1);
}
}
......
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