]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12927 installer should detect the magic quotes settings and undo the slashes...
authorskodak <skodak>
Tue, 26 Feb 2008 19:51:13 +0000 (19:51 +0000)
committerskodak <skodak>
Tue, 26 Feb 2008 19:51:13 +0000 (19:51 +0000)
install.php

index f0807e922c52b1dd48e32fa5663640ec6c21993f..e10cf07feddfd8d7692e2c747aca5e94996d0f3e 100644 (file)
@@ -93,8 +93,15 @@ if (isset($_POST['stage'])) {
 
     /// Get the stage for which the form was set and the next stage we are going to
 
+    $gpc = ini_get('magic_quotes_gpc');
+    $gpc = ($gpc == '1' or strtolower($gpc) == 'on');
+
     /// Store any posted data
     foreach ($_POST as $setting=>$value) {
+        if ($gpc) {
+            $value = stripslashes($value);
+        }
+
         $INSTALL[$setting] = $value;
     }