MDL-39484 core: Undefined ostype during installation process

This commit is contained in:
Frederic Massart
2013-05-06 10:06:09 +08:00
parent 95190fda69
commit cf4cef7d76
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -149,6 +149,7 @@ $CFG->httpswwwroot = $CFG->wwwroot;
$CFG->docroot = 'http://docs.moodle.org';
$CFG->running_installer = true;
$CFG->early_install_lang = true;
$CFG->ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX';
$parts = explode('/', str_replace('\\', '/', dirname(dirname(__FILE__))));
$CFG->admin = array_pop($parts);