Add support for prefix search in kolab cache
This commit is contained in:
parent
523686c97a
commit
011fa7949d
1 changed files with 5 additions and 0 deletions
|
@ -787,6 +787,11 @@ class kolab_storage_cache
|
|||
$param[1] = $not . 'LIKE';
|
||||
$qvalue = $this->db->quote('%'.preg_replace('/(^\^|\$$)/', ' ', $param[2]).'%');
|
||||
}
|
||||
else if ($param[1] == '~*' || $param[1] == '!~*') {
|
||||
$not = $param[1][1] == '!' ? 'NOT ' : '';
|
||||
$param[1] = $not . 'LIKE';
|
||||
$qvalue = $this->db->quote(preg_replace('/(^\^|\$$)/', ' ', $param[2]).'%');
|
||||
}
|
||||
else if ($param[0] == 'tags') {
|
||||
$param[1] = ($param[1] == '!=' ? 'NOT ' : '' ) . 'LIKE';
|
||||
$qvalue = $this->db->quote('% '.$param[2].' %');
|
||||
|
|
Loading…
Add table
Reference in a new issue