]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for warnigns
authortoyomoyo <toyomoyo>
Thu, 12 Oct 2006 08:33:52 +0000 (08:33 +0000)
committertoyomoyo <toyomoyo>
Thu, 12 Oct 2006 08:33:52 +0000 (08:33 +0000)
backup/restorelib.php

index 3ed8ec1930b0e7fdd7b4df09e229fbae7e55d9da..ac1ce8dcd053d338544f1913903c33ca28f48ce5 100644 (file)
@@ -45,7 +45,7 @@
         //Iterate
         foreach($modules as $name => $module) {
             //Only if the module is being restored
-            if ($module->restore == 1) {
+            if (isset($module->restore) && $module->restore == 1) {
                 //Include module library
                 include_once("$CFG->dirroot/mod/$name/lib.php");
                 //If module_refresh_events exists
@@ -72,7 +72,7 @@
         }
         foreach ($restore->mods as $name => $info) {
             //If the module is being restored
-            if ($info->restore == 1) {
+            if (isset($info->restore) && $info->restore == 1) {
                 //Check if the xxxx_decode_content_links_caller exists
                 include_once("$CFG->dirroot/mod/$name/restorelib.php");
                 $function_name = $name."_decode_content_links_caller";