From e4c05ec7b8971c882ae152e3b7afcd8a92e5362a Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 19 Oct 2010 07:36:22 +0000 Subject: [PATCH] MDL-24755 fixed double define in configonly scripts, credit goes to Aparup Banerjee --- lib/setup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index c9556167f5a..1c91ae381c4 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -165,10 +165,14 @@ if (file_exists("$CFG->dataroot/climaintenance.html")) { readfile("$CFG->dataroot/climaintenance.html"); die; } else { - define('CLI_MAINTENANCE', true); + if (!defined('CLI_MAINTENANCE')) { + define('CLI_MAINTENANCE', true); + } } } else { - define('CLI_MAINTENANCE', false); + if (!defined('CLI_MAINTENANCE')) { + define('CLI_MAINTENANCE', false); + } } // Detect ajax scripts - they are similar to CLI because we can not redirect, output html, etc. -- 2.43.0