forked from extern/egroupware
* GroupDAV/KDE assume KDE 4.7+ uses native Akonadi resource, while below pre-Akonadi GroupDAV resource is used: unfortunately both have contradicting requirements
This commit is contained in:
parent
ac2279d933
commit
7443fdc639
@ -206,9 +206,12 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
// identify clients, which do NOT support path AND full url in <D:href> of PROPFIND request
|
||||
switch(($agent = groupdav_handler::get_agent()))
|
||||
{
|
||||
case 'akonadi':
|
||||
$this->cnrnd = true; // Akonadi seems to require redundant namespaces, see KDE bug #265096 https://bugs.kde.org/show_bug.cgi?id=265096
|
||||
break;
|
||||
case 'kde': // KAddressbook (at least in 3.5 can NOT subscribe / does NOT find addressbook)
|
||||
$this->client_require_href_as_url = true;
|
||||
$this->cnrnd = true; // Akonadi seems to require redundant namespaces, see KDE bug #265096 https://bugs.kde.org/show_bug.cgi?id=265096
|
||||
$this->cnrnd = false; // KDE before Akonadi seems NOT to work with cnrnd (redundant namespaces)
|
||||
break;
|
||||
case 'cfnetwork': // Apple addressbook app
|
||||
case 'dataaccess': // iPhone addressbook
|
||||
|
@ -351,6 +351,7 @@ abstract class groupdav_handler
|
||||
'zideone' => 'zideone', // zideone outlook plugin
|
||||
'lightning' => 'lightning', // Lighting (SOGo connector for addressbook)
|
||||
'webkit' => 'webkit', // Webkit Browser (also reports KHTML!)
|
||||
'akonadi' => 'akonadi', // new KDE PIM framework (also reports KHTML!)
|
||||
'khtml' => 'kde', // KDE clients
|
||||
'neon' => 'neon',
|
||||
'ical4ol' => 'ical4ol', // iCal4OL client
|
||||
@ -377,6 +378,15 @@ abstract class groupdav_handler
|
||||
if ((int)$matches[1] < 868) $agent .= '_old';
|
||||
}
|
||||
break;
|
||||
case 'kde':
|
||||
// Akonadi (new KDE Pim framework) unfortunately has same user-agent as old kde
|
||||
// we can only assume KDE 4.7+ uses Akonadi native resource, while below this was not available
|
||||
// Unfortunately the old pre-Akonadi GroupDAV resource can still be used, but we have no way of detecting it
|
||||
if (preg_match('/KHTML\/([0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $matches) && (float)$matches[1] >= 4.7)
|
||||
{
|
||||
$agent = 'akonadi';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user