From 8e83e54815da1f0c8f23b9bd58e4ac459193cba1 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 20 Jun 2019 22:46:51 +0800 Subject: [PATCH] MDL-35773 core_backup: removed introduction of 'set_mode' --- backup/backup.php | 1 - backup/controller/backup_controller.class.php | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/backup/backup.php b/backup/backup.php index 1be7dcde060..6711cb67366 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -153,7 +153,6 @@ if (!async_helper::is_async_pending($id, 'course', 'backup')) { // Before we perform the backup check settings to see if user // or setting defaults are set to exclude files from the backup. if ($backup->get_setting_value('files') == 0) { - $bc->set_mode(backup::MODE_SAMESITE); $renderer->set_samesite_notification(); } diff --git a/backup/controller/backup_controller.class.php b/backup/controller/backup_controller.class.php index 245fca4fe9b..7180a3aa673 100644 --- a/backup/controller/backup_controller.class.php +++ b/backup/controller/backup_controller.class.php @@ -185,20 +185,6 @@ class backup_controller extends base_controller { backup_check::check_security($this, false); } - /** - * Sets the mode (purpose) of the backup. - * - * @param int $mode The mode to set. - */ - public function set_mode($mode) { - $this->mode = $mode; - $this->set_include_files(); // Need to check if files are included as mode may have changed. - $this->save_controller(); - $tbc = self::load_controller($this->backupid); - $this->logger = $tbc->logger; // Wakeup loggers. - $tbc->plan->destroy(); // Clean plan controller structures, keeping logger alive. - } - public function set_status($status) { // Note: never save_controller() with the object info after STATUS_EXECUTING or the whole controller, // containing all the steps will be sent to DB. 100% (monster) useless.