mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04: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 = "";
|
$not_defined = "";
|
||||||
switch( $tag ) {
|
switch( $tag ) {
|
||||||
case 'urn:ietf:params:xml:ns:caldav:is-not-defined':
|
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':
|
case 'urn:ietf:params:xml:ns:caldav:is-defined':
|
||||||
if ( isset( $parameter ) ) {
|
if ( isset( $parameter ) ) {
|
||||||
$need_post_filter = true;
|
$need_post_filter = true;
|
||||||
@ -114,7 +114,7 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter =
|
|||||||
default:
|
default:
|
||||||
$property_defined_match = "LIKE '_%'"; // i.e. contains a single character or more
|
$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;
|
break;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user