"fix for bug #764: \"Hide accounts from addressbook\" does not work with contacts in LDAP"

This commit is contained in:
Ralf Becker 2007-05-21 06:54:55 +00:00
parent 852f8149b2
commit 9c884e4b94

View File

@ -702,7 +702,7 @@ class so_ldap
$filters = '';
foreach($filter as $key => $value)
{
if ($key != 'cat_id' && !$value) continue;
if ($key != 'cat_id' && $key != 'account_id' && !$value) continue;
switch((string) $key)
{
@ -710,6 +710,18 @@ class so_ldap
case 'tid': // ignored
break;
case 'account_id':
if (is_null($value))
{
$filters .= '(!(uidNumber=*))';
}
elseif ($value)
{
$filters .= '(uidNumber='.ldap::quote($value).')';
}
break;
case 'cat_id':
if (is_null($value))
{