]> git.mjollnir.org Git - moodle.git/commitdiff
course/delete.php is using sesskey
authorstronk7 <stronk7>
Fri, 8 Oct 2004 17:58:38 +0000 (17:58 +0000)
committerstronk7 <stronk7>
Fri, 8 Oct 2004 17:58:38 +0000 (17:58 +0000)
Merged from MOODLE_14_STABLE

course/delete.php

index bbe67b8b8d09fa16b4c97075cafc937b34ad22d7..9070983c965101ed3afaf76fe7bba642cff30b66 100644 (file)
@@ -38,7 +38,7 @@
                      "$strdeletecheck");
 
         notice_yesno("$strdeletecoursecheck<br /><br />$course->fullname ($course->shortname)", 
-                     "delete.php?id=$course->id&amp;delete=".md5($course->timemodified), 
+                     "delete.php?id=$course->id&amp;delete=".md5($course->timemodified)."&amp;sesskey=$USER->sesskey"
                      "category.php?id=$course->category");
         exit;
     }
         error("The check variable was wrong - try again");
     }
 
+    if (!confirm_sesskey()) {
+        error(get_string('confirmsesskeybad', 'error'));
+    }
+
     // OK checks done, delete the course now.
     $strdeletingcourse = get_string("deletingcourse", "", $course->shortname);