]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18195 installer - ignore differences in slashes when checking $CFG->dirroot
authorstronk7 <stronk7>
Mon, 9 Feb 2009 17:30:11 +0000 (17:30 +0000)
committerstronk7 <stronk7>
Mon, 9 Feb 2009 17:30:11 +0000 (17:30 +0000)
admin/index.php

index b7eec1d41a1cc40a26d3e3a4df3add8702243beb..26803fe838b52a6decca539a31c04a142cda2389 100644 (file)
@@ -53,7 +53,8 @@
 /// Check settings in config.php
 
     $dirroot = dirname(realpath("../index.php"));
-    if (!empty($dirroot) and $dirroot != $CFG->dirroot) {
+    /// Check correct dirroot, ignoring slashes (though should be always forward slashes). MDL-18195
+    if (!empty($dirroot) and str_replace('\\', '/', $dirroot) != str_replace('\\', '/', $CFG->dirroot)) {
         print_error('fixsetting', 'debug', '', (object)array('current'=>$CFG->dirroot, 'found'=>$dirroot));
     }