MDL-22294 CLI installer now supports --dataroot argument correctly

This commit is contained in:
David Mudrak 2010-05-10 15:59:21 +00:00
parent 7d73574c6f
commit 59ba2bb002
3 changed files with 13 additions and 10 deletions

View file

@ -134,7 +134,7 @@ function install_db_validate($database, $dbhost, $dbuser, $dbpass, $dbname, $pre
* @return string
*/
function install_generate_configphp($database, $cfg, $userealpath=false) {
$configphp = '<?php // Moodle Configuration File ' . PHP_EOL . PHP_EOL;
$configphp = '<?php // Moodle configuration file' . PHP_EOL . PHP_EOL;
$configphp .= 'unset($CFG);' . PHP_EOL;
$configphp .= '$CFG = new stdClass();' . PHP_EOL . PHP_EOL; // prevent PHP5 strict warnings

View file

@ -785,7 +785,7 @@ function make_upload_directory($directory, $shownotices=true) {
umask(0000);
if (!file_exists($currdir)) {
if (!mkdir($currdir, $CFG->directorypermissions) or !is_writable($currdir)) {
if (!mkdir($currdir, $CFG->directorypermissions, true) or !is_writable($currdir)) {
if ($shownotices) {
echo '<div class="notifyproblem" align="center">ERROR: You need to create the directory '.
$currdir .' with web server write access</div>'."<br />\n";