mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-09 05:00:21 +00:00
Handle allprop and ommission of prop tag in calendar-query.
This commit is contained in:
parent
b281fe8d63
commit
9eb023f7ef
@ -29,6 +29,7 @@ function check_for_expansion( $calendar_data_node ) {
|
||||
$qry_content = $xmltree->GetContent('urn:ietf:params:xml:ns:caldav:calendar-query');
|
||||
|
||||
$properties = array();
|
||||
$include_properties = array();
|
||||
while (list($idx, $qqq) = each($qry_content))
|
||||
{
|
||||
$proptype = $qry_content[$idx]->GetNSTag();
|
||||
@ -38,13 +39,13 @@ while (list($idx, $qqq) = each($qry_content))
|
||||
foreach( $qry_content[$idx]->GetElements() AS $k => $v ) {
|
||||
$propertyname = $v->GetNSTag();
|
||||
$properties[$propertyname] = 1;
|
||||
if ( $v->GetNSTag() == 'urn:ietf:params:xml:ns:caldav:calendar-data' ) check_for_expansion($v);
|
||||
if ( $propertyname == 'urn:ietf:params:xml:ns:caldav:calendar-data' ) check_for_expansion($v);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'DAV::allprop':
|
||||
$properties['allprop'] = 1;
|
||||
if ( $qry_content[$idx]->GetNSTag() == 'DAV::include' ) {
|
||||
$properties['DAV::allprop'] = 1;
|
||||
if ( $qry_content[$idx]->GetNSTag() == 'DAV::include' ) {
|
||||
foreach( $qry_content[$idx]->GetElements() AS $k => $v ) {
|
||||
$include_properties[] = $v->GetNSTag(); /** $include_properties is referenced in DAVResource where allprop is expanded */
|
||||
if ( $v->GetNSTag() == 'urn:ietf:params:xml:ns:caldav:calendar-data' ) check_for_expansion($v);
|
||||
@ -53,6 +54,8 @@ while (list($idx, $qqq) = each($qry_content))
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( empty($properties) ) $properties['DAV::allprop'] = 1;
|
||||
|
||||
|
||||
/**
|
||||
* There can only be *one* FILTER element, and it must contain *one* COMP-FILTER
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user