mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #50 - Automatically unset maintenance_message and log an error if it had something.
This commit is contained in:
@@ -132,6 +132,15 @@ class outagelib {
|
||||
if (is_null($next)) {
|
||||
unset_config('maintenance_later');
|
||||
} else {
|
||||
$message = get_config('moodle', 'maintenance_message');
|
||||
if ($message) {
|
||||
if (!defined('PHPUNIT_TEST') || !PHPUNIT_TEST) {
|
||||
error_log('Disabling $CFG->maintenance_message to allow our template page to take place.');
|
||||
error_log('Previous value: '.$message);
|
||||
}
|
||||
// We cannot do much if forced config, but the logs will show the error.
|
||||
unset_config('maintenance_message');
|
||||
}
|
||||
set_config('maintenance_later', $next->starttime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user