mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-22294 CLI installer now supports --dataroot argument correctly
This commit is contained in:
parent
7d73574c6f
commit
59ba2bb002
3 changed files with 13 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue