From cb342045ecbe921ef31e0e085308ee32d12ee281 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 5 Apr 2006 02:44:33 +0000 Subject: [PATCH] The globals hack is history! --- lib/setup.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index 1cc2146cc2..a350547b91 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -347,13 +347,11 @@ global $HTTPSPAGEREQUIRED; } -/// The following is a hack to get around the problem of PHP installations -/// that have "register_globals" turned off (default since PHP 4.1.0). -/// This hack will be removed in 1.6. -/// It is strongly recommended to disable "register_globals"! -/// $CFG->disableglobalshack=true in config.php will override this (for dev testing) +/// The following code can emulate "register globals" if required. +/// This hack is no longer being applied as of Moodle 1.6 unless you really +/// really want to use it (by defining $CFG->enableglobalshack = true) - if (empty($CFG->disableglobalshack)) { + if (!empty($CFG->enableglobalshack)) { if (!empty($CFG->detect_unchecked_vars)) { global $UNCHECKED_VARS; $UNCHECKED_VARS->url = $_SERVER['PHP_SELF']; -- 2.39.5