admin/editor.php is now using sesskey.

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7
2004-10-03 00:07:27 +00:00
parent 1c2614a1f1
commit e2b459ad22
4 changed files with 11 additions and 5 deletions
+7 -3
View File
@@ -8,7 +8,11 @@
error("Only admins can access this page");
}
if($data = data_submitted()) {
if (!confirm_sesskey()) {
error(get_string('confirmsesskeybad', 'error'));
}
if ($data = data_submitted()) {
// do we want default values?
if(isset($data->resettodefaults)) {
@@ -21,7 +25,7 @@
error("Editor settings could not be updated!");
}
}
redirect("$CFG->wwwroot/$CFG->admin/editor.php", get_string("changessaved"), 1);
redirect("$CFG->wwwroot/$CFG->admin/editor.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
} else {
// Generate edit form
@@ -131,4 +135,4 @@ function reset_to_defaults () {
}
return true;
}
?>
?>