From 6161826de1779b7866ce17884b3bf63f6ac63b44 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 3 Feb 2012 18:21:20 +0000 Subject: [PATCH] add http://calendarserver.org/ns/:shared to shared addressbooks/calendars for Apple clients to mark collections to user as shared --- phpgwapi/inc/class.groupdav.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index 1edcf61f02..e35383f6cc 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -620,7 +620,9 @@ class groupdav extends HTTP_WebDAV_Server if ($path == '/' && $app == 'addressbook' && !$GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts']) { - $files['files'][] = $this->add_app($app,false,0,$path.$app.'-accounts/'); + $file = $this->add_app($app,false,0,$path.$app.'-accounts/'); + $file['props']['resourcetype']['val'][] = self::mkprop(self::CALENDARSERVER,'shared',''); + $files['files'][] = $file; } // added shared calendars or addressbooks $this->add_shared($files['files'], $path, $app, $user); @@ -669,7 +671,9 @@ class groupdav extends HTTP_WebDAV_Server (in_array('A',$addressbook_home_set) || in_array((string)$id,$addressbook_home_set)) && is_numeric($id) && ($owner = $id ? $this->accounts->id2name($id) : 'accounts')) { - $files[] = $this->add_app($app,false,$id,$path.'addressbook-'.$owner.'/'); + $file = $this->add_app($app,false,$id,$path.'addressbook-'.$owner.'/'); + $file['props']['resourcetype']['val'][] = self::mkprop(self::CALENDARSERVER,'shared',''); + $files[] = $file; } } break; @@ -694,7 +698,9 @@ class groupdav extends HTTP_WebDAV_Server (in_array('A',$calendar_home_set) || in_array((string)$id,$calendar_home_set)) && is_numeric($id) && ($owner = $this->accounts->id2name($id))) { - $files[] = $this->add_app($app,false,$id,$path.'calendar-'.$owner.'/'); + $file = $this->add_app($app,false,$id,$path.'calendar-'.$owner.'/'); + $file['props']['resourcetype']['val'][] = self::mkprop(self::CALENDARSERVER,'shared',''); + $files[] = $file; } } break;