From 91b6f535067701e381404f95620ddb157abf23ab Mon Sep 17 00:00:00 2001 From: npze Date: Tue, 1 Jul 2014 13:55:32 +0200 Subject: [PATCH] Add filter for expand part --- sources/libs/caldav-client/caldav-client.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sources/libs/caldav-client/caldav-client.php b/sources/libs/caldav-client/caldav-client.php index 6a5ea29..4b0659f 100644 --- a/sources/libs/caldav-client/caldav-client.php +++ b/sources/libs/caldav-client/caldav-client.php @@ -875,7 +875,7 @@ EOXML; * be an array with 'href', 'etag' and 'data' elements, corresponding to the URL, the server-supplied * etag (which only varies when the data changes) and the calendar data in iCalendar format. */ - function DoCalendarQuery( $filter, $url = null ) { + function DoCalendarQuery( $filter, $expand_filter, $url = null ) { if ( isset($url) ) $this->SetCalendar($url); @@ -883,7 +883,9 @@ EOXML; - + +$expand_filter + $filter @@ -936,9 +938,15 @@ EOXML; $this->SetDepth('1'); $filter = ""; if ( isset($start) && isset($finish) ) + { $range = ""; + $expand_filter = ""; + } else + { $range = ''; + $expand_filter = ""; + } $filter = << @@ -950,7 +958,8 @@ $range EOFILTER; - return $this->DoCalendarQuery($filter, $relative_url); + + return $this->DoCalendarQuery($filter, $expand_filter, $relative_url); } @@ -975,6 +984,7 @@ EOFILTER; $time_range = << EOTIME; + $expand_filter = ""; } // Warning! May contain traces of double negatives... @@ -996,7 +1006,7 @@ EOTIME; EOFILTER; - return $this->DoCalendarQuery($filter, $relative_url); + return $this->DoCalendarQuery($filter, $expand_filter, $relative_url); } @@ -1025,7 +1035,7 @@ EOFILTER; EOFILTER; } - return $this->DoCalendarQuery($filter, $relative_url); + return $this->DoCalendarQuery($filter, $expand_filter, $relative_url); }