if search pattern alread contains a wildcard, do NOT add further ones automatic (eg. in extended search in addressbook)

This commit is contained in:
Ralf Becker 2010-06-25 07:11:39 +00:00
parent 9bca389162
commit 30ce2262dd

View File

@ -830,6 +830,11 @@ class so_sql
elseif ($wildcard || $criteria[$col][0] == '!' ||
is_string($criteria[$col]) && (strpos($criteria[$col],'*')!==false || strpos($criteria[$col],'?')!==false))
{
// if search pattern alread contains a wildcard, do NOT add further ones automatic
if (is_string($criteria[$col]) && (strpos($criteria[$col],'*')!==false || strpos($criteria[$col],'?')!==false))
{
$wildcard = '';
}
$cmp_op = ' '.$this->db->capabilities['case_insensitive_like'].' ';
$negate = false;
if ($criteria[$col][0] == '!')