summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <tb@woodcrest.local>2013-10-24 08:38:32 (GMT)
committerThomas <tb@woodcrest.local>2013-10-24 08:41:57 (GMT)
commit32c98e3353cac07c5a393103065d733cbc370794 (patch)
treecac010fa254242c454333588d6daa2f22a50e9f1
parent5dfcf76244890a30c17db0a7b9e52cc83abc2751 (diff)
downloadiRony-32c98e3353cac07c5a393103065d733cbc370794.tar.gz
Fix time-range queries if only start is given (#2378)
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index 510ddba..17eba73 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -558,8 +558,12 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
if ($filter['name'] != 'VEVENT')
continue;
if (is_array($filter['time-range'])) {
- $query[] = array('dtstart', '<=', $filter['time-range']['end']);
- $query[] = array('dtend', '>=', $filter['time-range']['start']);
+ if (!empty($filter['time-range']['end'])) {
+ $query[] = array('dtstart', '<=', $filter['time-range']['end']);
+ }
+ if (!empty($filter['time-range']['start'])) {
+ $query[] = array('dtend', '>=', $filter['time-range']['start']);
+ }
}
}