]> git.mjollnir.org Git - moodle.git/commitdiff
The globals hack is history!
authormoodler <moodler>
Wed, 5 Apr 2006 02:44:33 +0000 (02:44 +0000)
committermoodler <moodler>
Wed, 5 Apr 2006 02:44:33 +0000 (02:44 +0000)
lib/setup.php

index 1cc2146cc2a9e654c077c02cf32607bb3ebcc898..a350547b9189e4e13985ae8bed296ffd4444153a 100644 (file)
@@ -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'];