From 0e3f456fe1186dac7675e9a499d46d31a66f07e5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Jul 2009 10:15:22 +0000 Subject: [PATCH] "RECURRENCE-ID: $event['reference'] is a calendar_id, not a timestamp" --- calendar/inc/class.calendar_ical.inc.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 9f865f89c5..c1d9c970f1 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -568,9 +568,12 @@ class calendar_ical extends calendar_boupdate } elseif ($event['reference']) { - if ($this->isWholeDay($event)) + // $event['reference'] is a calendar_id, not a timestamp + $revent = $this->read($event['reference']); + + if ($this->isWholeDay($revent)) { - $arr = $this->date2array($event['reference']); + $arr = $this->date2array($revent['start']); $vevent->setAttribute('RECURRENCE-ID', array( 'year' => $arr['year'], 'month' => $arr['month'], @@ -582,13 +585,14 @@ class calendar_ical extends calendar_boupdate { if ($servertime) { - $attributes['RECURRENCE-ID'] = date('Ymd\THis', $event['reference']); + $attributes['RECURRENCE-ID'] = date('Ymd\THis', $revent['start']); } else { - $attributes['RECURRENCE-ID'] = $event['reference']; + $attributes['RECURRENCE-ID'] = $revent['start']; } } + unset($revent); } break;