From 639835274cb9fc412e639eb4f2ec398b6f88be6c Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 17 Jul 2006 07:31:22 +0000 Subject: [PATCH] workaround by Dan for bug #6130, fixed some warnings; merged from MOODLE_16_STABLE --- calendar/event.php | 3 +++ calendar/event_new.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/calendar/event.php b/calendar/event.php index b7c78d64ab..7093c95290 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -485,6 +485,9 @@ if($eventtype == 'select') { $courseid = optional_param('courseid', $SESSION->cal_course_referer, PARAM_INT); + if ($courseid == 0) { // workaround by Dan for bug #6130 + $courseid = SITEID; + } if (!$course = get_record('course', 'id', $courseid)) { error('Incorrect course ID'); } diff --git a/calendar/event_new.html b/calendar/event_new.html index 3c036bec4e..6820973cfd 100644 --- a/calendar/event_new.html +++ b/calendar/event_new.html @@ -29,9 +29,9 @@ : - timestart);?> + timestart);?> - timestart) ?> + timestart) ?> -- 2.39.5