Fix #233 Add no_outage check to allow checkfinished.php to be execpt from the 503 maintenance logic

This commit is contained in:
John Yao
2021-02-11 16:41:29 +11:00
parent 8f7d38f355
commit c53a629bc8
2 changed files with 3 additions and 1 deletions

View File

@@ -79,7 +79,8 @@ if (!empty($_SERVER['REQUEST_URI'])) {
$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.
|| $outageinfo; // Allow outage info requests.
|| $outageinfo // Allow outage info requests.
|| (defined('NO_AUTH_OUTAGE') && NO_AUTH_OUTAGE); // Allow any page should not be blocked by maintenance mode.
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.