diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index b98782f5dd..cf9632a5bb 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -737,7 +737,13 @@ class calendar_boupdate extends calendar_bo case 'ical': if ($method == 'REQUEST') { - $ics = ExecMethod2('calendar.calendar_ical.exportVCal',$event['id'],'2.0',$method); + if (is_null($ics)) + { + $calendar_ical = new calendar_ical(); + $calendar_ical->setSupportedFields('groupdav'); // full iCal fields+event TZ + $ics = $calendar_ical->exportVCal($event['id'],'2.0',$method); + unset($calendar_ical); + } $attachment = array( 'string' => $ics, 'filename' => 'cal.ics', 'encoding' => '8bit', diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 7c3ebc0b95..36177e22d9 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2063,18 +2063,11 @@ class calendar_ical extends calendar_boupdate break; case 'file': // used outside of SyncML, eg. by the calendar itself ==> all possible fields - if (isset($this->cal_prefs['export_timezone'])) + if ($this->cal_prefs['export_timezone']) { - switch ($this->cal_prefs['export_timezone']) - { - case 1: - $this->tzid = false; // use event's TZ - break; - default: - $this->tzid = $this->cal_prefs['export_timezone']; - } + $this->tzid = $this->cal_prefs['export_timezone']; } - else + else // not set or '0' = use event TZ { $this->tzid = false; // use event's TZ }