Add support for draft DAV:current-user-principal property.

This commit is contained in:
Andrew McMillan 2008-10-25 20:37:05 +13:00
parent 640ca24213
commit e1e5ccbdd8
2 changed files with 10 additions and 0 deletions

View File

@ -249,6 +249,9 @@ function add_general_properties( &$prop, &$not_found, &$denied, $record ) {
if ( isset($prop_list['DAV::principal-collection-set']) ) {
$prop->NewElement("principal-collection-set", new XMLElement('href', ConstructURL('/') ) );
}
if ( isset($prop_list['DAV::current-user-principal']) ) {
$prop->NewElement("current-user-principal", $request->current_user_principal_xml);
}
if ( isset($prop_list['DAV::acl']) ) {
/**

View File

@ -122,6 +122,9 @@ function calendar_to_xml( $properties, $item ) {
case 'getcontenttype':
$prop->NewElement($k, "text/calendar" );
break;
/*
* I don't think this is correct. We should only list these properties against
* the (relevant) collection, not against it's contents.
case 'resourcetype':
$prop->NewElement($k, new XMLElement($reply->Caldav("calendar"), false) );
if ( $request->collection_type == 'in' ) {
@ -134,6 +137,10 @@ function calendar_to_xml( $properties, $item ) {
$prop->NewElement($k, new XMLElement($reply->Caldav("schedule-calendar"), false) );
}
break;
*/
case 'current-user-principal':
$prop->NewElement("current-user-principal", $request->current_user_principal_xml);
break;
case 'displayname':
$prop->NewElement($k, $displayname );
break;