Browse files

Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data…

… should clean up after itself
  • Loading branch information...
1 parent acb4177 commit 731f877fdbc1cb19cc13bca9e1505e355cccdc2f mjollnir_ committed Mar 2, 2007
Showing with 9 additions and 0 deletions.
  1. +9 −0 backup/restore_execute.html
View
9 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);

0 comments on commit 731f877

Please sign in to comment.