From 7be7aa059501c18bfd070099887fee2577407218 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Thu, 29 Mar 2001 09:56:43 +0000 Subject: [PATCH] Fix LDAP filtering, I think. --- addressbook/inc/class.contacts_ldap.inc.php | 3 +-- addressbook/inc/class.contacts_shared.inc.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.contacts_ldap.inc.php b/addressbook/inc/class.contacts_ldap.inc.php index 4ee7d7f02e..2b55008ba6 100644 --- a/addressbook/inc/class.contacts_ldap.inc.php +++ b/addressbook/inc/class.contacts_ldap.inc.php @@ -359,8 +359,7 @@ //echo '
first total="'.$total.'"'; // Now, remove duplicate rows - if (!$PHP_VERSION) global $PHP_VERSION; - if (floor($PHP_VERSION ) == 4) { + if (floor(phpversion()) == 4) { $tmp = array_unique($ldap_fields); $ldap_fields = $tmp; } else { diff --git a/addressbook/inc/class.contacts_shared.inc.php b/addressbook/inc/class.contacts_shared.inc.php index e80637d32f..3834be1ded 100644 --- a/addressbook/inc/class.contacts_shared.inc.php +++ b/addressbook/inc/class.contacts_shared.inc.php @@ -210,7 +210,7 @@ if ($allmatched) { if($DEBUG) { echo $ldap_fields[$i]["uidnumber"][0].' matched all!'."
"; } - $new_ldap[$i] = $ldap_fields[$i]; + $new_ldap[] = $ldap_fields[$i]; } else {