]> git.mjollnir.org Git - moodle.git/commitdiff
Deleting $SESSION structures before starting import.
authorstronk7 <stronk7>
Mon, 10 Apr 2006 18:13:18 +0000 (18:13 +0000)
committerstronk7 <stronk7>
Mon, 10 Apr 2006 18:13:18 +0000 (18:13 +0000)
course/import.php

index 2da08ad9863fe6f801e5215800cd68627f717858..c1b32b00bf1d98078d19a7ac277b5e63b907067d 100644 (file)
         error("You are not allowed to look at this page");
     }
 
+/// Always we begin an import, we delete all backup/restore/import session structures
+    if (isset($SESSION->course_header)) {
+        unset ($SESSION->course_header);
+    }
+    if (isset($SESSION->info)) {
+        unset ($SESSION->info);
+    }
+    if (isset($SESSION->backupprefs)) {
+        unset ($SESSION->backupprefs);
+    }
+    if (isset($SESSION->restore)) {
+        unset ($SESSION->restore);
+    }
+    if (isset($SESSION->import_preferences)) {
+        unset ($SESSION->import_preferences);
+    }
+
     $strimport = get_string('import');
 
     print_header($course->fullname.': '.$strimport, $course->fullname.': '.$strimport,