mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-03 14:09:23 +00:00
Merge branch 'master' of github.com:DAViCal/davical
This commit is contained in:
commit
3837e9a559
@ -109,7 +109,21 @@ function SqlFilterCardDAV( $filter, $components, $property = null, $parameter =
|
||||
break;
|
||||
}
|
||||
$pname = ':text_match_'.$matchnum++;
|
||||
$params[$pname] = '%'.$search.'%';
|
||||
$match_type = $v->GetAttribute("match-type");
|
||||
switch( strtolower($match_type) ) {
|
||||
case 'starts-with':
|
||||
$params[$pname] = $search.'%';
|
||||
break;
|
||||
case 'ends-with':
|
||||
$params[$pname] = '%'.$search;
|
||||
break;
|
||||
case 'equals':
|
||||
$params[$pname] = $search;
|
||||
case 'contains':
|
||||
default:
|
||||
$params[$pname] = '%'.$search.'%';
|
||||
break;
|
||||
}
|
||||
dbg_error_log("cardquery", " text-match: (%s%s %s '%s') ", (isset($negate) && strtolower($negate) == "yes" ? "NOT ": ""),
|
||||
$property, $comparison, $params[$pname] );
|
||||
$sql .= sprintf( "AND (%s%s %s $pname) ", (isset($negate) && strtolower($negate) == "yes" ? "NOT ": ""),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user