From: stronk7 Date: Fri, 8 Oct 2004 18:13:05 +0000 (+0000) Subject: course/edit.php is using sesskey. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=38c8de95914e9dcdf768262bef94957012e1e774;p=moodle.git course/edit.php is using sesskey. Merged from MOODLE_14_STABLE --- diff --git a/course/edit.html b/course/edit.html index f11e6ccb3e..177b499107 100644 --- a/course/edit.html +++ b/course/edit.html @@ -260,4 +260,5 @@ " /> + diff --git a/course/edit.php b/course/edit.php index 01eb90cd71..400fb72313 100644 --- a/course/edit.php +++ b/course/edit.php @@ -36,7 +36,7 @@ /// If data submitted, then process and store. - if ($form = data_submitted()) { + if ($form = data_submitted() and confirm_sesskey()) { if (empty($course)) { check_for_restricted_user($USER->username, "$CFG->wwwroot"); @@ -182,6 +182,8 @@ "$strcategories -> $straddnewcourse", $focus); } + $form->sesskey = !empty($USER->id) ? $USER->sesskey : ''; + print_heading($streditcoursesettings); print_simple_box_start("center", "", "$THEME->cellheading"); include("edit.html");