diff options
author | Valentin Popov <info@valentineus.link> | 2018-02-18 16:58:59 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-02-18 16:58:59 +0300 |
commit | 22b7569f71e37d79c937729e78d477327f4ec1a0 (patch) | |
tree | 5fedb31986fe3b6349ee50d430f2733be60b37fb /restorebackup.php | |
parent | fa74622268f0ec1e79563e1df5dd6100a5c6c9b8 (diff) | |
download | local_webhooks-22b7569f71e37d79c937729e78d477327f4ec1a0.tar.xz local_webhooks-22b7569f71e37d79c937729e78d477327f4ec1a0.zip |
Correct the check for 'sesskey'.
Diffstat (limited to 'restorebackup.php')
-rw-r--r-- | restorebackup.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/restorebackup.php b/restorebackup.php index 69f6057..e4f5763 100644 --- a/restorebackup.php +++ b/restorebackup.php @@ -40,12 +40,12 @@ $context = context_system::instance(); $mform = new service_backup_form($PAGE->url); /* Cancel processing */ -if (($mform->is_cancelled()) && confirm_sesskey()) { +if ($mform->is_cancelled()) { redirect($managerservice); } /* Processing the received file */ -if ($data = $mform->get_data()) { +if (($data = $mform->get_data()) && confirm_sesskey()) { $content = $mform->get_file_content("backupfile"); local_webhooks_restore_backup($content, $data->deleterecords); redirect($managerservice, new lang_string("restorefinished", "moodle")); |