admin/editor.php is now using sesskey.
Merged from MOODLE_14_STABLE
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@
|
||||
get_string("adminhelpbackup"));
|
||||
}
|
||||
|
||||
$table->data[]= array("<b><a href=\"editor.php\">". get_string("editorsettings") ."</a></b>",
|
||||
$table->data[]= array("<b><a href=\"editor.php?sesskey=$USER->sesskey\">". get_string("editorsettings") ."</a></b>",
|
||||
get_string("adminhelpeditorsettings"));
|
||||
|
||||
print_table($table);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<form method="post" action="<?php print($GLOBALS['ME']);?>">
|
||||
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
|
||||
<table border="0" cellpadding="4" cellspacing="2">
|
||||
<tr valign="top">
|
||||
<td align="right"><p>htmleditor:</td>
|
||||
@@ -76,6 +77,7 @@
|
||||
</form>
|
||||
|
||||
<form method="post" action="<?php print($GLOBALS['ME']);?>">
|
||||
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
|
||||
<center>
|
||||
<input type="submit" name="resettodefaults" value="<?php print_string('editorresettodefaults') ?>" />
|
||||
</center>
|
||||
|
||||
+7
-3
@@ -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;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
+1
-1
@@ -303,7 +303,7 @@
|
||||
$configdata .= "<font size=+1> </font><a href=\"backup.php?sesskey=$USER->sesskey\">".get_string("backup")."</a> - <font size=\"1\">".
|
||||
get_string("adminhelpbackup")."</font><br />";
|
||||
}
|
||||
$configdata .= "<font size=+1> </font><a href=\"editor.php\">". get_string("editorsettings") ."</a> - <font size=\"1\">".
|
||||
$configdata .= "<font size=+1> </font><a href=\"editor.php?sesskey=$USER->sesskey\">". get_string("editorsettings") ."</a> - <font size=\"1\">".
|
||||
get_string("adminhelpeditorsettings")."</font><br />";
|
||||
|
||||
$table->data[] = array("<font size=+1><b><a href=\"configure.php\">".get_string("configuration")."</a></b>",
|
||||
|
||||
Reference in New Issue
Block a user