Minor - added comment about repeated events not possible in the past - refs #7285

1.9.x
Yannick Warnier 10 years ago
parent d1a3b48df9
commit f7395f010b
  1. 3
      main/calendar/agenda.lib.php

@ -393,6 +393,8 @@ class Agenda
$typeList = array('daily', 'weekly', 'monthlyByDate', 'monthlyByDay', 'monthlyByDayR', 'yearly');
// The event has to repeat *in the future*. We don't allow repeated
// events in the past
if ($end > $now && in_array($type, $typeList)) {
$sql = "INSERT INTO $t_agenda_r (c_id, cal_id, cal_type, cal_end)
VALUES ($course_id, '$eventId', '$type', '$end')";
@ -2275,6 +2277,7 @@ class Agenda
$freq = $trans[$repeat['FREQ']];
if (isset($repeat['UNTIL']) && !empty($repeat['UNTIL'])) {
// Check if datetime or just date (strlen == 8)
if (strlen($repeat['UNTIL']) == 8) {
// Fix the datetime format to avoid exception in the next step
$repeat['UNTIL'] .= 'T000000';

Loading…
Cancel
Save