MDL-75862 backup: omit sesskey for continue buttons using get method.

It's automatically added by the rendered single_button instance when
using post method, so no need to add it unconditionally.
This commit is contained in:
Paul Holden
2022-11-10 10:17:19 +08:00
committed by Jake Dallimore
parent 87002d24be
commit 3fd54014ae
3 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -553,7 +553,8 @@ class core_backup_renderer extends plugin_renderer_base {
}
/**
* Displays a continue button
* Displays a continue button, overriding core renderer method of the same in order
* to override submission method of the button form
*
* @param string|moodle_url $url
* @param string $method
@@ -566,7 +567,6 @@ class core_backup_renderer extends plugin_renderer_base {
if ($method != 'post') {
$method = 'get';
}
$url->param('sesskey', sesskey());
$button = new single_button($url, get_string('continue'), $method, true);
$button->class = 'continuebutton';
return $this->render($button);