mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-10-22 18:18:07 +02:00
Issue #50 - Automatically unset maintenance_message and log an error if it had something.
This commit is contained in:
1 parent
b79a70d122
commit
619a5a663f
2 files changed
+59
No files matched your search
@@ -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