From: stronk7 Date: Fri, 8 Oct 2004 18:32:27 +0000 (+0000) Subject: course/editsection.php is using sesskey. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=676eb5e8df9899b6c3a1e71e0a9f1118287ca15f;p=moodle.git course/editsection.php is using sesskey. Merged from MOODLE_14_STABLE --- diff --git a/course/editsection.html b/course/editsection.html index e0eab2e75a..96f9892010 100644 --- a/course/editsection.html +++ b/course/editsection.html @@ -22,6 +22,7 @@ + " /> diff --git a/course/editsection.php b/course/editsection.php index d56cd22568..5bc78ead0d 100644 --- a/course/editsection.php +++ b/course/editsection.php @@ -23,7 +23,7 @@ /// If data submitted, then process and store. - if ($form = data_submitted()) { + if ($form = data_submitted() and confirm_sesskey()) { $timenow = time(); @@ -43,6 +43,8 @@ $form = $section; } + $form->sesskey = !empty($USER->id) ? $USER->sesskey : ''; + $usehtmleditor = can_use_html_editor(); $sectionname = get_string("name$course->format");