From 846711d69fafcf5fce68ea739331d831af9e71ff Mon Sep 17 00:00:00 2001 From: Tony Levi Date: Tue, 6 Jan 2015 10:42:05 +1030 Subject: [PATCH] MDL-48924 backup: Fix some get_file_packer() calls for enabletgzbackups --- course/externallib.php | 2 +- course/tests/courselib_test.php | 2 +- lib/tests/questionlib_test.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/course/externallib.php b/course/externallib.php index 71c24a0d595..7a7d24567d2 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -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. diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index 77ef9e0f234..c3a9dd2aaa2 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -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(); diff --git a/lib/tests/questionlib_test.php b/lib/tests/questionlib_test.php index 10b4007a031..94bb71e12d7 100644 --- a/lib/tests/questionlib_test.php +++ b/lib/tests/questionlib_test.php @@ -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();