forked from extern/egroupware
Add CardDAV support for Apple's latest Addressbook.app
This commit is contained in:
parent
d11ce583fb
commit
3ed265e4fe
@ -132,8 +132,8 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
case 'davkit': // iCal app in OS X 10.6 created wrong request, if full url given
|
||||
$this->client_require_href_as_url = false;
|
||||
break;
|
||||
case 'cfnetwork':
|
||||
$this->crrnd = true; // Apple Addressbook.app does not cope with namespace redundancy
|
||||
case 'cfnetwork_old':
|
||||
$this->crrnd = true; // Older Apple Addressbook.app does not cope with namespace redundancy
|
||||
}
|
||||
parent::HTTP_WebDAV_Server();
|
||||
|
||||
|
@ -329,7 +329,7 @@ abstract class groupdav_handler
|
||||
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
foreach(array(
|
||||
'davkit' => 'davkit', // Apple iCal
|
||||
'cfnetwork' => 'cfnetwork', // Apple Addressbook
|
||||
'cfnetwork' => 'cfnetwork', // Apple Addressbook
|
||||
'bionicmessage.net' => 'funambol', // funambol GroupDAV connector from bionicmessage.net
|
||||
'zideone' => 'zideone', // zideone outlook plugin
|
||||
'lightning' => 'lightning', // Lighting (SOGo connector for addressbook)
|
||||
@ -347,6 +347,17 @@ abstract class groupdav_handler
|
||||
{
|
||||
error_log("Unrecogniced GroupDAV client: HTTP_USER_AGENT='$_SERVER[HTTP_USER_AGENT]'!");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ($agent)
|
||||
{
|
||||
case 'cfnetwork':
|
||||
if (preg_match('/address%20book\/([0-9.]+)/', $user_agent, $matches))
|
||||
{
|
||||
if ((int)$matches[1] < 868) $agent .= '_old';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $agent;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user