From: Dongsheng Cai Date: Tue, 22 May 2012 06:43:06 +0000 (+0800) Subject: MDL-33177 Fixed restore warning when backup has external contents X-Git-Tag: v2.3.0-beta~322^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=ac0628e913078f10cb812e5c153114f23905e1e0;hp=d106cf1d7dba0ca597d9d8f60ca249ac78a333a0 MDL-33177 Fixed restore warning when backup has external contents --- diff --git a/backup/util/helper/backup_general_helper.class.php b/backup/util/helper/backup_general_helper.class.php index b0eb2e237d2..ff5dc89ddd1 100644 --- a/backup/util/helper/backup_general_helper.class.php +++ b/backup/util/helper/backup_general_helper.class.php @@ -145,7 +145,12 @@ abstract class backup_general_helper extends backup_helper { $info->original_course_startdate= $infoarr['original_course_startdate']; $info->original_course_contextid= $infoarr['original_course_contextid']; $info->original_system_contextid= $infoarr['original_system_contextid']; - $info->include_file_references_to_external_content = $infoarr['include_file_references_to_external_content']; + // Moodle backup file don't have this option before 2.3 + if (!empty($infoarr['include_file_references_to_external_content'])) { + $info->include_file_references_to_external_content = 1; + } else { + $info->include_file_references_to_external_content = 0; + } $info->type = $infoarr['details']['detail'][0]['type']; $info->format = $infoarr['details']['detail'][0]['format']; $info->mode = $infoarr['details']['detail'][0]['mode'];