From 7cd4036b3487608bac6b03206a120ef2b9bb5b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Fri, 23 Apr 2010 10:41:44 +0000 Subject: [PATCH] Fix iCal export of incomplete events --- calendar/inc/class.calendar_ical.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index a63273f4fe..f7f5c4bda8 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -183,7 +183,7 @@ class calendar_ical extends calendar_boupdate /** * Exports one calendar event to an iCalendar item * - * @param int|array $events (array of) cal_id or array of the events + * @param int|array $events (array of) cal_id or array of the events with timestamps in server time * @param string $version='1.0' could be '2.0' too * @param string $method='PUBLISH' * @param int $recur_date=0 if set export the next recurrence at or after the timestamp, @@ -244,8 +244,9 @@ class calendar_ical extends calendar_boupdate $recurrence = $this->date2usertime($recur_date); $tzid = null; - if (!is_array($event) - && !($event = $this->read($event, $recurrence, false, 'server'))) + if (is_array($event) && empty($event['tzid'])) $event = $event['id']; + + if (!($event = $this->read($event, $recurrence, false, 'server'))) { if ($this->read($event, $recurrence, true, 'server')) {