Merge branch 'MDL-39484-master-int' of git://github.com/FMCorz/moodle

This commit is contained in:
Damyon Wiese 2013-05-06 15:38:24 +08:00
commit 373a40c5db
2 changed files with 3 additions and 1 deletions

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

View File

@ -151,7 +151,7 @@ if (!empty($_POST)) {
$config->dataroot = empty($distro->dataroot) ? null : $distro->dataroot; // initialised later after including libs or by distro
}
// Fake some settings so that we can use selected functions from moodlelib.php and weblib.php
// Fake some settings so that we can use selected functions from moodlelib.php, weblib.php and filelib.php.
$CFG = new stdClass();
$CFG->lang = $config->lang;
$CFG->dirroot = dirname(__FILE__);
@ -168,6 +168,7 @@ $CFG->langlocalroot = $CFG->dataroot.'/lang';
$CFG->directorypermissions = isset($distro->directorypermissions) ? $distro->directorypermissions : 00777; // let distros set dir permissions
$CFG->running_installer = true;
$CFG->early_install_lang = true;
$CFG->ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX';
// Require all needed libs
require_once($CFG->libdir.'/setuplib.php');