Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-33177 Fixed restore warning when backup has external contents

  • Loading branch information...
commit ac0628e913078f10cb812e5c153114f23905e1e0 1 parent d106cf1
@dcai dcai authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 backup/util/helper/backup_general_helper.class.php
View
7 backup/util/helper/backup_general_helper.class.php
@@ -145,7 +145,12 @@ public static function get_backup_information($tempdir) {
$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'];
Please sign in to comment.
Something went wrong with that request. Please try again.