MDL-18195 installer - ignore differences in slashes when checking $CFG->dirroot

This commit is contained in:
stronk7 2009-02-09 17:30:11 +00:00
parent dc482cfac0
commit c454b86c64

View 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));
}