Skip to content

Commit

Permalink
Merged from MOODLE_16_STABLE: fixing bug MDL-8651: import course data…
Browse files Browse the repository at this point in the history
… should clean up after itself
  • Loading branch information
mjollnir_ committed Mar 2, 2007
1 parent acb4177 commit 731f877
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backup/restore_execute.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
print_simple_box(get_string("restorefinished"),"center"); print_simple_box(get_string("restorefinished"),"center");
} else { } else {
print_simple_box(get_string("importdatafinished"),"center"); 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); unset($SESSION->restore);
} }
print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id); print_continue("$CFG->wwwroot/course/view.php?id=".$restore->course_id);
Expand Down

0 comments on commit 731f877

Please sign in to comment.