From 5a301c16a1fd75a3aaed65900f835166ce3c3f62 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 8 Nov 2011 14:46:31 +0800 Subject: [PATCH] fixed --- backup/util/ui/restore_ui.class.php | 8 +++++++- backup/util/ui/restore_ui_stage.class.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backup/util/ui/restore_ui.class.php b/backup/util/ui/restore_ui.class.php index 4478db1fe98..5a2d8063514 100644 --- a/backup/util/ui/restore_ui.class.php +++ b/backup/util/ui/restore_ui.class.php @@ -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 diff --git a/backup/util/ui/restore_ui_stage.class.php b/backup/util/ui/restore_ui_stage.class.php index a50f2592517..9e3a0aebaae 100644 --- a/backup/util/ui/restore_ui_stage.class.php +++ b/backup/util/ui/restore_ui_stage.class.php @@ -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();