From 510f9baf9423d8fcbd488c6af7fa8a871bd4fedd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 8 Jul 2008 05:52:04 +0000 Subject: [PATCH] "KAddressbook still has problem with self URL in propfind of /addressbook/ collection contains GroupDAV resourcetype, disabling it only for KAddressbook " --- phpgwapi/inc/class.groupdav.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index 5a287639dc..1198c623b3 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -108,7 +108,6 @@ class groupdav extends HTTP_WebDAV_Server function OPTIONS($path, &$dav, &$allow) { list(,$app) = explode('/',$path); - switch($app) { case 'calendar': @@ -206,8 +205,8 @@ class groupdav extends HTTP_WebDAV_Server 'path' => '/'.$app.'/', 'props' => $handler->extra_properties(array( self::mkprop('displayname',$this->translation->convert(lang($app),$this->egw_charset,'utf-8')), - // Kontact doubles the folder, if the self URL contains the GroupDAV/CalDAV resourcetypes - self::mkprop('resourcetype', $this->_resourcetype($app,strpos($_SERVER['HTTP_USER_AGENT'],'KHTML') !== false)), + // KAddressbook doubles the folder, if the self URL contains the GroupDAV/CalDAV resourcetypes + self::mkprop('resourcetype', $this->_resourcetype($app,$app=='addressbook'&&strpos($_SERVER['HTTP_USER_AGENT'],'KHTML') !== false)), )), ); } @@ -224,7 +223,7 @@ class groupdav extends HTTP_WebDAV_Server * Return resourcetype(s) for a given app * * @param string $app - * @param boolean $no_extra_types=false should the GroupDAV and CalDAV types be added (Kontact has problems with it in self URL) + * @param boolean $no_extra_types=false should the GroupDAV and CalDAV types be added (KAddressbook has problems with it in self URL) * @return array or DAV properties generated via */ function _resourcetype($app,$no_extra_types=false) @@ -239,6 +238,7 @@ class groupdav extends HTTP_WebDAV_Server $resourcetype[] = self::mkprop($ns,'resourcetype', $type); } } + //error_log(__METHOD__."($app,$no_extra_types)=".array2string($resourcetype)); return $resourcetype; }