MDL-74466 repository: avoid passing around sesskey when not required.

This commit is contained in:
Paul Holden
2023-12-04 09:22:27 +00:00
parent abba174fe1
commit 70323bc04f
5 changed files with 45 additions and 66 deletions
+1 -3
View File
@@ -144,10 +144,8 @@ class repository extends base {
if ($hassiteconfig && $this->is_enabled()) {
// Completely no access to repository setting when it is not enabled.
$sectionname = $this->get_settings_section_name();
$settingsurl = new moodle_url('/admin/repository.php',
array('sesskey' => sesskey(), 'action' => 'edit', 'repos' => $this->name));
$settings = new admin_externalpage($sectionname, $this->displayname,
$settingsurl, 'moodle/site:config', false);
new moodle_url('/admin/repository.php', ['action' => 'edit', 'repos' => $this->name]), 'moodle/site:config', false);
$adminroot->add($parentnodename, $settings);
}
}