From a24b3913fba681e272a82a1de764642723774dcd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 30 Jun 2003 19:50:42 +0000 Subject: [PATCH] fixed bug in search_units, suffix is now search case-intensitive --- lam/lib/ldap.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 966bfe73..e82cbacd 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -144,7 +144,14 @@ class Ldap{ } } // add root suffix if needed - if (!in_array($suffix, $ret)) { + $found == false; + for ($i = 0; $i < sizeof($ret); $i++) { // search suffix case-intensitive + if (strtolower($suffix) == strtolower($ret[$i])) { + $found = true; + break; + } + } + if (!$found) { $ret[] = $suffix; } return $ret;