MDL-13339 - ensure we don't continue the restore process if there is

no course header in the backup file. This bug was causing blank course
records to be created when users tried to restore a non-moodle backup file
such as a scorm file.
This commit is contained in:
poltawski
2008-02-07 18:48:53 +00:00
parent f461eacc8e
commit f8cfb1230f
+5
View File
@@ -6682,6 +6682,11 @@
$info = restore_read_xml_info ($xml_file);
//Reading course_header from file
$course_header = restore_read_xml_course_header ($xml_file);
if(!is_object($course_header)){
// ensure we fail if there is no course header
$course_header = false;
}
}
if (!defined('RESTORE_SILENTLY')) {