mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 15:38:27 +01:00
Enable ldap to search multiple cats, I hope
This commit is contained in:
parent
3038c414e4
commit
2d615d84b9
@ -188,18 +188,55 @@
|
|||||||
reset($filterfields);
|
reset($filterfields);
|
||||||
while (list($col,$filt) = each($filterfields))
|
while (list($col,$filt) = each($filterfields))
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
if ($col == 'phpgwcontactcatid')
|
||||||
if ($ldap_fields[$i][$col][0] == $filt)
|
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
$colarray = explode(',',$ldap_fields[$i][$col][0]);
|
||||||
$yes &= True;
|
if ($colarray[1])
|
||||||
$match++;
|
{
|
||||||
|
while(list($key,$val) = each ($colarray))
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$val.'"'; }
|
||||||
|
if ($val == $filt)
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
||||||
|
$yes &= True;
|
||||||
|
$match++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
||||||
|
if ($ldap_fields[$i][$col][0] == $filt)
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
||||||
|
$yes &= True;
|
||||||
|
$match++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ', but number '.$ldap_fields[$i]["uidnumber"][0].' did not match.'." "; }
|
||||||
|
$yes &= False;
|
||||||
|
$match--;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', but number '.$ldap_fields[$i]["uidnumber"][0].' did not match.'." "; }
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
||||||
$yes &= False;
|
if ($ldap_fields[$i][$col][0] == $filt)
|
||||||
$match--;
|
{
|
||||||
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
||||||
|
$yes &= True;
|
||||||
|
$match++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($DEBUG) { echo ', but number '.$ldap_fields[$i]["uidnumber"][0].' did not match.'." "; }
|
||||||
|
$yes &= False;
|
||||||
|
$match--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user