mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
* CalDAV: allow to create private events on OS X iCal, fixing DAV header for new shared folders
This commit is contained in:
parent
ceef3a3866
commit
8a5200db66
@ -522,6 +522,8 @@ 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');
|
||||
break;
|
||||
|
||||
case 'ORGANIZER':
|
||||
@ -2199,7 +2201,7 @@ class calendar_ical extends calendar_boupdate
|
||||
}
|
||||
|
||||
if (!is_a($component, 'Horde_iCalendar_vevent') ||
|
||||
!($event = $this->vevent2egw($component, $component->getAttribute('VERSION'), $this->supportedFields, $principalURL)))
|
||||
!($event = $this->vevent2egw($component, $component->_container->getAttribute('VERSION'), $this->supportedFields, $principalURL)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -2999,6 +3001,14 @@ class calendar_ical extends calendar_boupdate
|
||||
$event['recur_enddate'] = egw_time::to($last, 'server');
|
||||
}
|
||||
|
||||
// Apple iCal on OS X uses X-CALENDARSERVER-ACCESS: CONFIDENTIAL on VCALANDAR (not VEVENT!)
|
||||
if (($x_calendarserver_access = $component->_container->getAttribute('X-CALENDARSERVER-ACCESS')) &&
|
||||
!is_a($x_calendarserver_access, 'PEAR_Error'))
|
||||
{
|
||||
$event['public'] = (int)(strtoupper($x_calendarserver_access) == 'PUBLIC');
|
||||
}
|
||||
//error_log(__METHOD__."() X-CALENDARSERVER-ACCESS=".array2string($x_calendarserver_access).' --> public='.array2string($event['public']));
|
||||
|
||||
// if no end is given in iCal we use the default lenght from user prefs
|
||||
// whole day events get one day in calendar_boupdate::save()
|
||||
if (!isset($event['end']))
|
||||
|
@ -298,7 +298,7 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
{
|
||||
$app = 'calendar';
|
||||
}
|
||||
elseif (strpos($path, '/addressbook/') !== false)
|
||||
elseif (preg_match('#/addressbook(-[^/]+)?/#', $path)) // eg. /<username>/addressbook-<otheruser>/
|
||||
{
|
||||
$app = 'addressbook';
|
||||
}
|
||||
@ -312,11 +312,12 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
$dav[] = 'calendar-proxy';
|
||||
// required by iOS iCal to use principal-property-search to autocomplete participants (and locations)
|
||||
$dav[] = 'calendarserver-principal-property-search';
|
||||
// required by iOS & OS X iCal to show private checkbox (X-CALENDARSERVER-ACCESS: CONFIDENTIAL on VCALENDAR)
|
||||
$dav[] = 'calendarserver-private-events';
|
||||
// other capabilities calendarserver announces
|
||||
//$dav[] = 'calendar-schedule';
|
||||
//$dav[] = 'calendar-availability';
|
||||
//$dav[] = 'inbox-availability';
|
||||
//$dav[] = 'calendarserver-private-events';
|
||||
//$dav[] = 'calendarserver-private-comments';
|
||||
//$dav[] = 'calendarserver-sharing';
|
||||
//$dav[] = 'calendarserver-sharing-no-scheduling';
|
||||
|
Loading…
Reference in New Issue
Block a user