mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-13 08:00:15 +00:00
Fix SQL syntax error if is-not-defined is used as a prop-filter.
This commit is contained in:
parent
533d407196
commit
6e6ff6b115
@ -88,7 +88,7 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter =
|
||||
$not_defined = "";
|
||||
switch( $tag ) {
|
||||
case 'urn:ietf:params:xml:ns:caldav:is-not-defined':
|
||||
$not_defined = "not-"; // then fall through to IS-DEFINED case
|
||||
$not_defined = "not"; // then fall through to IS-DEFINED case
|
||||
case 'urn:ietf:params:xml:ns:caldav:is-defined':
|
||||
if ( isset( $parameter ) ) {
|
||||
$need_post_filter = true;
|
||||
@ -114,7 +114,7 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter =
|
||||
default:
|
||||
$property_defined_match = "LIKE '_%'"; // i.e. contains a single character or more
|
||||
}
|
||||
$sql .= sprintf( "AND %s %s%s ", $property, $not_defined, $property_defined_match );
|
||||
$sql .= sprintf( "AND %s %s %s ", $property, $not_defined, $property_defined_match );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user