mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Moodle code style fix.
This commit is contained in:
@@ -45,8 +45,7 @@ if (is_callable('auth_outage_bootstrap_callback')) {
|
||||
// 2) Check for allowed scripts or IPs during outages.
|
||||
$allowed = !file_exists($CFG->dataroot.'/climaintenance.php') // Not in maintenance mode.
|
||||
|| (defined('ABORT_AFTER_CONFIG') && ABORT_AFTER_CONFIG) // Only config requested.
|
||||
|| (defined('CLI_SCRIPT') && CLI_SCRIPT) // Allow CLI scripts.
|
||||
;
|
||||
|| (defined('CLI_SCRIPT') && CLI_SCRIPT); // Allow CLI scripts.
|
||||
if (!$allowed) {
|
||||
// Call the climaintenance.php which will check for allowed IPs.
|
||||
$CFG->dirroot = dirname(dirname(dirname(__FILE__))); // It is not defined yet but the script below needs it.
|
||||
|
||||
@@ -66,8 +66,7 @@ class maintenance_static_page_io {
|
||||
$result = outagelib::fetch_page($file);
|
||||
} else {
|
||||
$result = ['contents' => @file_get_contents($file)];
|
||||
$result['mime'] = (new finfo(FILEINFO_MIME_TYPE))
|
||||
->buffer($result['contents']); // Not perfect, but try guessing it.
|
||||
$result['mime'] = (new finfo(FILEINFO_MIME_TYPE))->buffer($result['contents']); // Try guessing it.
|
||||
}
|
||||
|
||||
if ($result['contents'] === false) {
|
||||
|
||||
Reference in New Issue
Block a user