From 94ff12c4294cd7451a52a9c19afedc6e4b12e6bb Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 23 Jan 2005 11:26:00 +0000 Subject: [PATCH] Changed some sesskey behaviours SC#73 (admin part) Plus some minor alignment and CFG->htmleditor not being saved. --- admin/configure.php | 2 +- admin/editor.html | 2 +- admin/editor.php | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/admin/configure.php b/admin/configure.php index 68e6036a3f..7b6284f70f 100644 --- a/admin/configure.php +++ b/admin/configure.php @@ -41,7 +41,7 @@ get_string('adminhelpbackup')); } - $table->data[]= array("sesskey\">". get_string('editorsettings') ."", + $table->data[]= array("". get_string('editorsettings') ."", get_string('adminhelpeditorsettings')); $table->data[]= array("sesskey\">". get_string('calendarsettings', 'admin') ."", get_string('helpcalendarsettings', 'admin')); diff --git a/admin/editor.html b/admin/editor.html index b48f266a1e..acca996978 100644 --- a/admin/editor.html +++ b/admin/editor.html @@ -3,7 +3,7 @@ -
htmleditor: + resettodefaults)) { @@ -25,7 +21,7 @@ error("Editor settings could not be updated!"); } } - redirect("$CFG->wwwroot/$CFG->admin/editor.php?sesskey=$USER->sesskey", get_string("changessaved"), 1); + redirect("$CFG->wwwroot/$CFG->admin/editor.php", get_string("changessaved"), 1); } else { // Generate edit form @@ -72,6 +68,7 @@ function editor_convert_to_array ($string) { } function editor_update_config ($data) { + /// Updates the editor config values. if (!is_object($data)) { @@ -101,6 +98,7 @@ function editor_update_config ($data) { // make array of values to update $updatedata = array(); + $updatedata['htmleditor'] = !empty($data->htmleditor) ? $data->htmleditor : 0; $updatedata['editorbackgroundcolor'] = !empty($data->backgroundcolor) ? $data->backgroundcolor : "#ffffff"; $updatedata['editorfontfamily'] = !empty($data->fontfamily) ? str_replace($nochars,"",$data->fontfamily) : "Times New Roman, Times"; $updatedata['editorfontsize'] = !empty($data->fontsize) ? $data->fontsize : ""; -- 2.39.5