Tweak case where filter-end is set without filter-start (rare).

This commit is contained in:
Andrew McMillan 2009-04-13 20:42:29 +12:00
parent f19481f849
commit a34c522ae5

View File

@ -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;