* iCal on iPhone detects URL now correct

reverted calendar-home-set to report only users calendar, as reporting multiple break propfind
This commit is contained in:
Ralf Becker 2010-10-20 18:59:27 +00:00
parent c67a61b692
commit 20a409ca52
2 changed files with 11 additions and 1 deletions

View File

@ -82,6 +82,9 @@ class groupdav extends HTTP_WebDAV_Server
'resourcetype' => array(self::GROUPDAV => 'vtodo-collection', self::CALDAV => 'calendar'), 'resourcetype' => array(self::GROUPDAV => 'vtodo-collection', self::CALDAV => 'calendar'),
'component-set' => array(self::GROUPDAV => 'VTODO'), 'component-set' => array(self::GROUPDAV => 'VTODO'),
), ),
'principals' => array(
'resourcetype' => array(self::DAV => 'principal'),
)
); );
/** /**
* Debug level: 0 = nothing, 1 = function calls, 2 = more info, 3 = complete $_SERVER array * Debug level: 0 = nothing, 1 = function calls, 2 = more info, 3 = complete $_SERVER array
@ -135,12 +138,14 @@ class groupdav extends HTTP_WebDAV_Server
break; break;
case 'davkit': // iCal app in OS X 10.6 created wrong request, if full url given case 'davkit': // iCal app in OS X 10.6 created wrong request, if full url given
$this->client_require_href_as_url = false; $this->client_require_href_as_url = false;
$this->cnrnd = true;
break; break;
case 'cfnetwork_old': case 'cfnetwork_old':
$this->crrnd = true; // Older Apple Addressbook.app does not cope with namespace redundancy $this->crrnd = true; // Older Apple Addressbook.app does not cope with namespace redundancy
break; break;
case 'neon': case 'neon':
$this->cnrnd = true; // neon clients like cadaver $this->cnrnd = true; // neon clients like cadaver
break;
} }
// adding EGroupware version to X-Dav-Powered-By header eg. "EGroupware 1.8.001 CalDAV/CardDAV/GroupDAV server" // adding EGroupware version to X-Dav-Powered-By header eg. "EGroupware 1.8.001 CalDAV/CardDAV/GroupDAV server"
$this->dav_powered_by = str_replace('EGroupware','EGroupware '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'], $this->dav_powered_by = str_replace('EGroupware','EGroupware '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'],
@ -337,7 +342,7 @@ class groupdav extends HTTP_WebDAV_Server
} }
return true; return true;
} }
if (!in_array($app,array('principals','groups')) && !$GLOBALS['egw_info']['user']['apps'][$app]) if ($app != 'principals' && !$GLOBALS['egw_info']['user']['apps'][$app])
{ {
if ($this->debug) error_log(__CLASS__."::$method(path=$options[path]) 403 Forbidden: no app rights for '$app'"); if ($this->debug) error_log(__CLASS__."::$method(path=$options[path]) 403 Forbidden: no app rights for '$app'");
return "403 Forbidden: no app rights for '$app'"; // no rights for the given app return "403 Forbidden: no app rights for '$app'"; // no rights for the given app

View File

@ -284,6 +284,10 @@ class groupdav_principals extends groupdav_handler
$addressbooks[] = HTTP_WebDAV_Server::mkprop('href',$this->base_uri.'/'.urlencode($owner).'/'); $addressbooks[] = HTTP_WebDAV_Server::mkprop('href',$this->base_uri.'/'.urlencode($owner).'/');
} }
} }
$calendars[] = HTTP_WebDAV_Server::mkprop('href',
$this->base_uri.'/'.$account['account_lid'].'/');
/* iCal send propfind to wrong url (concatinated href's), if we return multiple href in calendar-home-set
$cal_bo = new calendar_bo(); $cal_bo = new calendar_bo();
foreach ($cal_bo->list_cals() as $label => $entry) foreach ($cal_bo->list_cals() as $label => $entry)
{ {
@ -292,6 +296,7 @@ class groupdav_principals extends groupdav_handler
$calendars[] = HTTP_WebDAV_Server::mkprop('href', $calendars[] = HTTP_WebDAV_Server::mkprop('href',
$this->base_uri.'/'.$owner.'/'); $this->base_uri.'/'.$owner.'/');
} }
*/
} }
else else
{ {