backported Jörgs r30193: Fix DAV issue for neon for GroupDAV, too

This commit is contained in:
Ralf Becker 2010-05-18 12:08:36 +00:00
parent 0abbc95889
commit 92578f9d02
4 changed files with 7 additions and 4 deletions

View File

@ -138,6 +138,9 @@ class groupdav extends HTTP_WebDAV_Server
break;
case 'cfnetwork_old':
$this->crrnd = true; // Older Apple Addressbook.app does not cope with namespace redundancy
break;
case 'neon':
$this->cnrnd = true; // neon clients like cadaver
}
parent::HTTP_WebDAV_Server();

View File

@ -334,7 +334,7 @@ abstract class groupdav_handler
'zideone' => 'zideone', // zideone outlook plugin
'lightning' => 'lightning', // Lighting (SOGo connector for addressbook)
'khtml' => 'kde', // KDE clients
'cadaver' => 'cadaver',
'neon' => 'neon'
) as $pattern => $name)
{
if (strpos($user_agent,$pattern) !== false)

View File

@ -628,14 +628,14 @@ class Horde_iCalendar {
// Parse the remaining attributes.
if (preg_match_all('/^((?:[^":]+|(?:"[^"]*")+)*):([^\r\n]*)\r?$/m', $vCal, $matches)) {
foreach ($matches[0] as $attribute) {
preg_match('/([^;^:]*)((;(?:[^":]+|(?:"[^"]*")+)*)?):([^\r\n]*)[\r\n]*/', $attribute, $parts);
preg_match('/([^:;]*)((;(?:(?:[^":\\\]*(?:\\\.)?)+|(?:"[^"]*")+)*)?):([^\r\n]*)[\r\n]*/', $attribute, $parts);
$tag = trim(String::upper($parts[1]));
$value = $parts[4];
$params = array();
// Parse parameters.
if (!empty($parts[2])) {
preg_match_all('/;(([^;=]*)(=([^;]*))?)/', $parts[2], $param_parts);
preg_match_all('/;(([^;=]*)(=((?:[^;\\\]*(?:\\\.)?)*))?)/', $parts[2], $param_parts);
foreach ($param_parts[2] as $key => $paramName) {
$paramName = String::upper($paramName);
$paramValue = $param_parts[4][$key];

View File

@ -100,7 +100,7 @@ $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (strstr($user_agent, 'microsoft-webdav') !== false ||
strstr($user_agent, 'neon') !== false)
{
// Neon & Windows 7 special treatment
// neon & Windows 7 special treatment
$webdav_server->cnrnd = true;
}
$webdav_server->ServeRequest();