]> git.mjollnir.org Git - moodle.git/commitdiff
Merged sesskey fix from stable
authormoodler <moodler>
Fri, 5 Nov 2004 06:29:48 +0000 (06:29 +0000)
committermoodler <moodler>
Fri, 5 Nov 2004 06:29:48 +0000 (06:29 +0000)
calendar/view.php

index 3f3402594dfcc42a6772f08cd6a45ef0f3be06ec..4107d78f07003e025652dac1b6029242a075d3f9 100644 (file)
@@ -544,7 +544,7 @@ function calendar_show_upcoming_events($courses, $groups, $users, $futuredays, $
 
 
 function calendar_print_event($event) {
-    global $CFG, $THEME;
+    global $CFG, $THEME, $USER;
 
     static $strftimetime;
 
@@ -582,8 +582,8 @@ function calendar_print_event($event) {
             $editlink   = CALENDAR_URL.'event.php?action=edit&amp;id='.$event->id;
             $deletelink = CALENDAR_URL.'event.php?action=delete&amp;id='.$event->id;
         } else {
-            $editlink   = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&amp;return=true';
-            $deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid;
+            $editlink   = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&amp;return=true&amp;sesskey='.$USER->sesskey;
+            $deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid.'&amp;sesskey='.$USER->sesskey;;
         }
         echo ' <a href="'.$editlink.'"><img
                   src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"