Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing bug MDL-8651: import course data should clean up after itself

  • Loading branch information...
commit bd2cf8f04659e8a982185b95e7f5185c51c99575 1 parent 2dd1350
mjollnir_ authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 backup/restore_execute.html
View
9 backup/restore_execute.html
@@ -53,6 +53,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);
Please sign in to comment.
Something went wrong with that request. Please try again.