This commit is contained in:
Rajesh Taneja
2011-11-08 14:47:34 +08:00
parent 5f30ffdac1
commit 5a301c16a1
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -224,13 +224,19 @@ class restore_ui extends base_ui {
/**
* Cancels the current restore and redirects the user back to the relevant place
*/
public function cancel_restore() {
public function cancel_process() {
//Delete temporary restore course if exists.
if ($this->controller->get_target() == backup::TARGET_NEW_COURSE) {
$this->cleanup();
}
parent::cancel_process();
}
/**
* wrapper of cancel_process, kept for avoiding regression.
*/
public function cancel_restore() {
$this->cancel_process();
}
/**
* Gets an array of progress bar items that can be displayed through the restore renderer.
* @return array Array of items for the progress bar
+1 -1
View File
@@ -333,7 +333,7 @@ class restore_ui_stage_settings extends restore_ui_stage {
$form = $this->initialise_stage_form();
if ($form->is_cancelled()) {
$this->ui->cancel_restore();
$this->ui->cancel_process();
}
$data = $form->get_data();