mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
allow to search for multiple items and strip "contact_" prefix
This commit is contained in:
parent
1d4e4d7db5
commit
034f836aca
@ -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