From ebfff4e01415516d20ec3cc009b356884e00bec7 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 3 Oct 2004 09:48:08 +0000 Subject: [PATCH] admin/module.php is now using sesskey. Merged from MOODLE_14_STABLE --- admin/module.php | 3 +++ admin/modules.php | 2 +- mod/assignment/config.html | 1 + mod/attendance/config.html | 1 + mod/chat/config.html | 1 + mod/forum/config.html | 1 + mod/glossary/config.html | 1 + mod/glossary/formats.php | 6 +++--- mod/resource/config.html | 1 + mod/scorm/config.html | 1 + 10 files changed, 14 insertions(+), 4 deletions(-) diff --git a/admin/module.php b/admin/module.php index 3985475d24..1ab26d4e91 100644 --- a/admin/module.php +++ b/admin/module.php @@ -13,6 +13,9 @@ error("Site isn't defined!"); } + if (!confirm_sesskey()) { + error(get_string('confirmsesskeybad', 'error')); + } /// If data submitted, then process and store. diff --git a/admin/modules.php b/admin/modules.php index 61cc3ffa19..2ee2b0c26b 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -165,7 +165,7 @@ $delete = "name\">$strdelete"; if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) { - $settings = "name\">$strsettings"; + $settings = "name&sesskey=$USER->sesskey\">$strsettings"; } else { $settings = ""; } diff --git a/mod/assignment/config.html b/mod/assignment/config.html index b00b76a509..a0701f3b1e 100644 --- a/mod/assignment/config.html +++ b/mod/assignment/config.html @@ -1,4 +1,5 @@
+ diff --git a/mod/attendance/config.html b/mod/attendance/config.html index a31d9b209f..6f6137c777 100644 --- a/mod/attendance/config.html +++ b/mod/attendance/config.html @@ -1,4 +1,5 @@ +
diff --git a/mod/chat/config.html b/mod/chat/config.html index c713b724d5..27c3f25ea7 100644 --- a/mod/chat/config.html +++ b/mod/chat/config.html @@ -1,4 +1,5 @@ +
diff --git a/mod/forum/config.html b/mod/forum/config.html index f4a92a5b0b..58c422d92f 100644 --- a/mod/forum/config.html +++ b/mod/forum/config.html @@ -1,4 +1,5 @@ +
diff --git a/mod/glossary/config.html b/mod/glossary/config.html index c413966034..3b5fdde7d6 100644 --- a/mod/glossary/config.html +++ b/mod/glossary/config.html @@ -3,6 +3,7 @@ $no = get_string("no"); ?> +
diff --git a/mod/glossary/formats.php b/mod/glossary/formats.php index 90bbd85d65..f1fdc07a02 100644 --- a/mod/glossary/formats.php +++ b/mod/glossary/formats.php @@ -32,7 +32,7 @@ } update_record("glossary_formats",$displayformat); } - redirect("../../admin/module.php?module=glossary#formats"); + redirect("../../admin/module.php?sesskey=$USER->sesskey&module=glossary#formats"); die; } elseif ( $mode == 'edit' and $form) { @@ -44,7 +44,7 @@ $displayformat->sortorder = $form->sortorder; update_record("glossary_formats",$displayformat); - redirect("../../admin/module.php?module=glossary#formats"); + redirect("../../admin/module.php?sesskey=$USER->sesskey&module=glossary#formats"); die; } @@ -57,7 +57,7 @@ print_header("$strmodulename: $strconfiguration", $site->fullname, "$stradmin -> ". "$strconfiguration -> ". - "$strmanagemodules -> $strmodulename -> $strdisplayformats"); + "$strmanagemodules -> sesskey\">$strmodulename -> $strdisplayformats"); print_heading($strmodulename . ': ' . get_string("displayformats","glossary")); diff --git a/mod/resource/config.html b/mod/resource/config.html index 0ca20db913..819cf5fd74 100644 --- a/mod/resource/config.html +++ b/mod/resource/config.html @@ -1,4 +1,5 @@ +
diff --git a/mod/scorm/config.html b/mod/scorm/config.html index 23e60b919f..34f2a3815b 100755 --- a/mod/scorm/config.html +++ b/mod/scorm/config.html @@ -1,4 +1,5 @@ +
-- 2.39.5