Enable ldap to search multiple cats, I hope

This commit is contained in:
Miles Lott 2001-05-26 12:37:24 +00:00
parent 3038c414e4
commit 2d615d84b9

View File

@ -187,6 +187,25 @@
{
reset($filterfields);
while (list($col,$filt) = each($filterfields))
{
if ($col == 'phpgwcontactcatid')
{
$colarray = explode(',',$ldap_fields[$i][$col][0]);
if ($colarray[1])
{
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)
@ -202,6 +221,24 @@
$match--;
}
}
}
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--;
}
}
}
if ($yes)
{