From 438606fca351370de106cb98f4886e7b34958d93 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 10 Jul 2011 13:12:05 +0200 Subject: [PATCH] MDL-28156 restore - fix some notices restoring empty courses --- backup/util/helper/backup_general_helper.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup/util/helper/backup_general_helper.class.php b/backup/util/helper/backup_general_helper.class.php index ee86c1ac4ec..20238fe50e9 100644 --- a/backup/util/helper/backup_general_helper.class.php +++ b/backup/util/helper/backup_general_helper.class.php @@ -153,7 +153,9 @@ abstract class backup_general_helper extends backup_helper { $rolemappings->modified = false; $rolemappings->mappings = array(); $info->role_mappings = $rolemappings; - + // Some initially empty containers + $info->sections = array(); + $info->activities = array(); // Now the contents $contentsarr = $infoarr['contents']; @@ -164,7 +166,6 @@ abstract class backup_general_helper extends backup_helper { } if (isset($contentsarr['sections']) && isset($contentsarr['sections']['section'])) { $sectionarr = $contentsarr['sections']['section']; - $sections = array(); foreach ($sectionarr as $section) { $section = (object)$section; $section->settings = array(); @@ -174,7 +175,6 @@ abstract class backup_general_helper extends backup_helper { } if (isset($contentsarr['activities']) && isset($contentsarr['activities']['activity'])) { $activityarr = $contentsarr['activities']['activity']; - $activities = array(); foreach ($activityarr as $activity) { $activity = (object)$activity; $activity->settings = array();