MDL-48924 backup: Fix some get_file_packer() calls for enabletgzbackups

This commit is contained in:
Tony Levi
2015-01-29 22:53:14 +10:30
parent c06aa292b1
commit 846711d69f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();