From 8847a82e254f8c051cb51835fad3917a4dbe51f0 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 10 Apr 2006 18:13:18 +0000 Subject: [PATCH] Deleting $SESSION structures before starting import. --- course/import.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/course/import.php b/course/import.php index 2da08ad986..c1b32b00bf 100644 --- a/course/import.php +++ b/course/import.php @@ -13,6 +13,23 @@ 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, -- 2.39.5