mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
allow to search for multiple items and strip "contact_" prefix
This commit is contained in:
parent
76b0bac25e
commit
15d8e0d422
@ -821,10 +821,17 @@ class Ldap
|
||||
}
|
||||
foreach($this->schema2egw as $mapping)
|
||||
{
|
||||
if (substr($egwSearchKey, 0, 8) === 'contact_')
|
||||
{
|
||||
$egwSearchKey = substr($egwSearchKey, 8);
|
||||
}
|
||||
if(($ldapSearchKey = $mapping[$egwSearchKey]))
|
||||
{
|
||||
$searchString = Api\Translation::convert($searchValue,$this->charset,'utf-8');
|
||||
$searchFilter .= '('.$ldapSearchKey.'='.$wildcard.Api\Ldap::quote($searchString).$wildcard.')';
|
||||
foreach((array)$searchValue as $val)
|
||||
{
|
||||
$searchString = Api\Translation::convert($val, $this->charset,'utf-8');
|
||||
$searchFilter .= '('.$ldapSearchKey.'='.$wildcard.Api\Ldap::quote($searchString).$wildcard.')';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user