debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294
This commit is contained in:
+10
-1
@@ -141,10 +141,19 @@ $INSTALL['release'] = $release;
|
||||
/// Have the $db object ready because we are going to use it often
|
||||
$db = &ADONewConnection($INSTALL['dbtype']);
|
||||
|
||||
/// guess the www root
|
||||
/// guess the www root and secure dataroot
|
||||
if ($INSTALL['wwwroot'] == '') {
|
||||
list($INSTALL['wwwroot'], $xtra) = explode('/install.php', qualified_me());
|
||||
$INSTALL['wwwrootform'] = $INSTALL['wwwroot'];
|
||||
|
||||
// now count slashes and treverse dirroot to get one level above web root
|
||||
$up = preg_match_all('/\//', $INSTALL['wwwroot'], $matches) - 1;
|
||||
$CFG->dataroot = $CFG->dirroot;
|
||||
for ($i=0; $i<$up; $i++) {
|
||||
$CFG->dataroot = dirname($CFG->dataroot);
|
||||
}
|
||||
$CFG->dataroot .= '/moodledata';
|
||||
$INSTALL['dataroot'] = $CFG->dataroot;
|
||||
}
|
||||
|
||||
$headstagetext = array(WELCOME => get_string('chooselanguagehead', 'install'),
|
||||
|
||||
Reference in New Issue
Block a user