forked from extern/egroupware
supported-report-set as required for CardDAV and Sogo connector
This commit is contained in:
parent
2e99a3fb20
commit
b446f6de4e
@ -325,6 +325,22 @@ class addressbook_groupdav extends groupdav_handler
|
||||
return '"'.$result[0]['modified'].'"';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add extra properties for addressbook collections
|
||||
*
|
||||
* @param array $props=array() regular props by the groupdav handler
|
||||
* @return array
|
||||
*/
|
||||
static function extra_properties(array $props=array())
|
||||
{
|
||||
// supported reports (required property for CardDAV)
|
||||
$props[] = HTTP_WebDAV_Server::mkprop('supported-report-set',array(
|
||||
HTTP_WebDAV_Server::mkprop('supported-report','addressbook-query'),
|
||||
HTTP_WebDAV_Server::mkprop('supported-report','addressbook-multiget'),
|
||||
));
|
||||
return $props;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the handler and set the supported fields
|
||||
*
|
||||
|
@ -497,7 +497,16 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
default:
|
||||
$ns = $prop['ns'];
|
||||
}
|
||||
$arr[$ns.':'.$prop['name']] = $prop['val'];
|
||||
// allow multiple values for same name
|
||||
if (isset($arr[$ns.':'.$prop['name']]))
|
||||
{
|
||||
$arr[$ns.':'.$prop['name']] = (array)$arr[$ns.':'.$prop['name']];
|
||||
$arr[$ns.':'.$prop['name']][] = $prop['val'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$arr[$ns.':'.$prop['name']] = $prop['val'];
|
||||
}
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user