From: mjollnir_ Date: Fri, 2 Mar 2007 01:43:47 +0000 (+0000) Subject: Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data should clean... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b5037f726b84ed816c637d568c99e49c3c45d0b7;p=moodle.git Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data should clean up after itself --- diff --git a/backup/restore_execute.html b/backup/restore_execute.html index 25ae3a2bb7..64be901a54 100644 --- a/backup/restore_execute.html +++ b/backup/restore_execute.html @@ -54,6 +54,15 @@ print_simple_box(get_string("restorefinished"),"center"); } else { print_simple_box(get_string("importdatafinished"),"center"); + $file = $CFG->dataroot . '/' + . $SESSION->import_preferences->backup_course + . '/backupdata/' . $SESSION->import_preferences->backup_name; + if (is_readable($file)) { + unlink($file); + } + else { + error_log("import course data: couldn't unlink $file"); + } unset($SESSION->restore); } print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);