MDL-60923 backup: Added $CFG->backuptempdir
The new setting will allow to host the temporary backup files into a specific target directory. Defaults to '$CFG->tempdir/backup'. Calling make_backup_temp_directory() checks that the required sub-directory will be properly created under the new target directory.
This commit is contained in:
@@ -211,9 +211,9 @@ class course_bin extends base_bin {
|
||||
// Get the backup file.
|
||||
$file = reset($files);
|
||||
|
||||
// Get a temp directory name and create it.
|
||||
// Get a backup temp directory name and create it.
|
||||
$tempdir = \restore_controller::get_tempdir_name($context->id, $user->id);
|
||||
$fulltempdir = make_temp_directory('/backup/' . $tempdir);
|
||||
$fulltempdir = make_backup_temp_directory($tempdir);
|
||||
|
||||
// Extract the backup to tempdir.
|
||||
$fb = get_file_packer('application/vnd.moodle.backup');
|
||||
|
||||
Reference in New Issue
Block a user