Permalink
Browse files

MDL-28156 restore - fix some notices restoring empty courses

  • Loading branch information...
1 parent 3a32dae commit 4daa20bb5bfb13b3376564c57980f75a091d96ce @stronk7 stronk7 committed Jul 10, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 backup/util/helper/backup_general_helper.class.php
@@ -153,7 +153,9 @@ public static function get_backup_information($tempdir) {
$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 @@ public static function get_backup_information($tempdir) {
}
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 @@ public static function get_backup_information($tempdir) {
}
if (isset($contentsarr['activities']) && isset($contentsarr['activities']['activity'])) {
$activityarr = $contentsarr['activities']['activity'];
- $activities = array();
foreach ($activityarr as $activity) {
$activity = (object)$activity;
$activity->settings = array();

0 comments on commit 4daa20b

Please sign in to comment.