Skip to content

Commit

Permalink
workaround by Dan for bug #6130, fixed some warnings; merged from MOO…
Browse files Browse the repository at this point in the history
…DLE_16_STABLE
  • Loading branch information
skodak committed Jul 17, 2006
1 parent 63aea88 commit 6398352
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions calendar/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions calendar/event_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<?php print_string('eventdate', 'calendar'); ?>:
</td>
<td>
<?php print_date_selector('startday', 'startmon', 'startyr', $form->timestart);?>
<?php print_date_selector('startday', 'startmon', 'startyr', (int)$form->timestart);?>
<?php print_string('eventtime', 'calendar');?>
<?php print_time_selector('starthr', 'startmin', $form->timestart) ?>
<?php print_time_selector('starthr', 'startmin', (int)$form->timestart) ?>
<?php if (isset($err['timestart'])) formerr($err['timestart']); ?>
</td>
</tr>
Expand Down

0 comments on commit 6398352

Please sign in to comment.