From a34c522ae5da9ac43a79a8d440e2e76c0ae95f06 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 13 Apr 2009 20:42:29 +1200 Subject: [PATCH] Tweak case where filter-end is set without filter-start (rare). --- inc/caldav-REPORT-calquery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php index 645ba2e1..28077393 100644 --- a/inc/caldav-REPORT-calquery.php +++ b/inc/caldav-REPORT-calquery.php @@ -132,7 +132,8 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter = $sql .= sprintf( "OR event_has_exceptions(caldav_data.caldav_data) )" ); } else if ( isset( $finish ) ) { - $sql .= sprintf( "AND %s <= %s::timestamp with time zone ", $start_column, qpg($finish) ); + $sql .= sprintf( "AND (%s <= %s::timestamp with time zone ", $start_column, qpg($finish) ); + $sql .= sprintf( "OR event_has_exceptions(caldav_data.caldav_data) )" ); } break;