MDL-48924 backup: Fix some get_file_packer() calls for enabletgzbackups
This commit is contained in:
@@ -1028,7 +1028,7 @@ class core_course_external extends external_api {
|
||||
|
||||
// Check if we need to unzip the file because the backup temp dir does not contains backup files.
|
||||
if (!file_exists($backupbasepath . "/moodle_backup.xml")) {
|
||||
$file->extract_to_pathname(get_file_packer(), $backupbasepath);
|
||||
$file->extract_to_pathname(get_file_packer('application/vnd.moodle.backup'), $backupbasepath);
|
||||
}
|
||||
|
||||
// Create new course.
|
||||
|
||||
@@ -1726,7 +1726,7 @@ class core_course_courselib_testcase extends advanced_testcase {
|
||||
$bc->execute_plan();
|
||||
$results = $bc->get_results();
|
||||
$file = $results['backup_destination'];
|
||||
$fp = get_file_packer();
|
||||
$fp = get_file_packer('application/vnd.moodle.backup');
|
||||
$filepath = $CFG->dataroot . '/temp/backup/test-restore-course-event';
|
||||
$file->extract_to_pathname($fp, $filepath);
|
||||
$bc->destroy();
|
||||
|
||||
@@ -186,7 +186,7 @@ class core_questionlib_testcase extends advanced_testcase {
|
||||
$bc->execute_plan();
|
||||
$results = $bc->get_results();
|
||||
$file = $results['backup_destination'];
|
||||
$fp = get_file_packer();
|
||||
$fp = get_file_packer('application/vnd.moodle.backup');
|
||||
$filepath = $CFG->dataroot . '/temp/backup/test-restore-course';
|
||||
$file->extract_to_pathname($fp, $filepath);
|
||||
$bc->destroy();
|
||||
|
||||
Reference in New Issue
Block a user