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:12:17 +00:00
parent e2529e9e39
commit 709777615c

View File

@ -829,6 +829,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] == '!')