From 99b7fc66a0ed98214021d024dbd5e7193cd68126 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 22 Jun 2015 14:13:28 +0000 Subject: [PATCH] use X-CALENDARSERVER-ACCESS attribute on vCalendar only for CalDAV, not eg. for file export and import --- calendar/inc/class.calendar_ical.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index f32c7ad6de..7a19cf4436 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -529,7 +529,10 @@ class calendar_ical extends calendar_boupdate case 'CLASS': $attributes['CLASS'] = $event['public'] ? 'PUBLIC' : 'PRIVATE'; // Apple iCal on OS X uses X-CALENDARSERVER-ACCESS: CONFIDENTIAL on VCALANDAR (not VEVENT!) - if (!$event['public']) $vcal->setAttribute('X-CALENDARSERVER-ACCESS', 'CONFIDENTIAL'); + if (!$event['public'] && $this->productManufacturer == 'GroupDAV') + { + $vcal->setAttribute('X-CALENDARSERVER-ACCESS', 'CONFIDENTIAL'); + } break; case 'ORGANIZER': @@ -2998,7 +3001,8 @@ class calendar_ical extends calendar_boupdate } // Apple iCal on OS X uses X-CALENDARSERVER-ACCESS: CONFIDENTIAL on VCALANDAR (not VEVENT!) - if (($x_calendarserver_access = $component->_container->getAttribute('X-CALENDARSERVER-ACCESS')) && + if ($this->productManufacturer == 'GroupDAV' && + ($x_calendarserver_access = $component->_container->getAttribute('X-CALENDARSERVER-ACCESS')) && !is_a($x_calendarserver_access, 'PEAR_Error')) { $event['public'] = (int)(strtoupper($x_calendarserver_access) == 'PUBLIC');