Merged sesskey fix from stable

This commit is contained in:
moodler 2004-11-05 06:29:48 +00:00
parent 29a84fcb6a
commit 2038a163d8

View 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&id='.$event->id;
$deletelink = CALENDAR_URL.'event.php?action=delete&id='.$event->id;
} else {
$editlink = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&return=true';
$deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid;
$editlink = $CFG->wwwroot.'/course/mod.php?update='.$event->cmid.'&return=true&sesskey='.$USER->sesskey;
$deletelink = $CFG->wwwroot.'/course/mod.php?delete='.$event->cmid.'&sesskey='.$USER->sesskey;;
}
echo ' <a href="'.$editlink.'"><img
src="'.$CFG->pixpath.'/t/edit.gif" alt="'.get_string('tt_editevent', 'calendar').'"