From 4bf6f61131af5a3b7847e5e0491eb218120faba2 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 23 Nov 2017 18:42:47 +0400 Subject: External backup function --- restorebackup.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'restorebackup.php') diff --git a/restorebackup.php b/restorebackup.php index b4cfce0..011de03 100644 --- a/restorebackup.php +++ b/restorebackup.php @@ -46,14 +46,8 @@ if ($mform->is_cancelled()) { /* Processing the received file */ if ($data = $mform->get_data()) { - $content = $mform->get_file_content("backupfile"); - $callbacks = local_webhooks_unarchive_data($content); - - local_webhooks_remove_list_records(); - foreach ($callbacks as $callback) { - local_webhooks_update_record($callback, true); - } - + $content = $mform->get_file_content("backupfile"); + local_webhooks_restore_backup($content); redirect($managerservice, new lang_string("restorefinished", "moodle")); } -- cgit v1.2.3