Fix support for missing <prop> or <allprop/> on multiget/query reports.

This commit is contained in:
Andrew McMillan 2012-07-05 12:23:27 +12:00
parent c1bdf04848
commit d88e1ca007
2 changed files with 4 additions and 2 deletions

View File

@ -29,7 +29,7 @@ switch( $proptype ) {
break; break;
case 'DAV::allprop': case 'DAV::allprop':
$properties['allprop'] = 1; $properties['DAV::allprop'] = 1;
if ( $qry_content[1]->GetNSTag() == 'DAV::include' ) { if ( $qry_content[1]->GetNSTag() == 'DAV::include' ) {
foreach( $qry_content[1]->GetElements() AS $k => $v ) { foreach( $qry_content[1]->GetElements() AS $k => $v ) {
$include_properties[] = $v->GetNSTag(); /** $include_properties is referenced in DAVResource where allprop is expanded */ $include_properties[] = $v->GetNSTag(); /** $include_properties is referenced in DAVResource where allprop is expanded */
@ -41,6 +41,7 @@ switch( $proptype ) {
default: default:
$properties[$proptype] = 1; $properties[$proptype] = 1;
} }
if ( empty($properties) ) $properties['DAV::allprop'] = 1;
/** /**
* There can only be *one* FILTER element. * There can only be *one* FILTER element.

View File

@ -38,7 +38,7 @@ switch( $proptype ) {
break; break;
case 'DAV::allprop': case 'DAV::allprop':
$properties['allprop'] = 1; $properties['DAV::allprop'] = 1;
if ( $qry_content[1]->GetNSTag() == 'DAV::include' ) { if ( $qry_content[1]->GetNSTag() == 'DAV::include' ) {
foreach( $qry_content[1]->GetElements() AS $k => $v ) { foreach( $qry_content[1]->GetElements() AS $k => $v ) {
$include_properties[] = $v->GetNSTag(); /** $include_properties is referenced in DAVResource where allprop is expanded */ $include_properties[] = $v->GetNSTag(); /** $include_properties is referenced in DAVResource where allprop is expanded */
@ -50,6 +50,7 @@ switch( $proptype ) {
default: default:
$properties[$proptype] = 1; $properties[$proptype] = 1;
} }
if ( empty($properties) ) $properties['DAV::allprop'] = 1;
$collection = new DAVResource($request->path); $collection = new DAVResource($request->path);
$bound_from = $collection->bound_from(); $bound_from = $collection->bound_from();