From 174539d53f85869721806810fa1bbdce1a4a1ad6 Mon Sep 17 00:00:00 2001 From: katagia Date: Tue, 28 Sep 2004 16:42:12 +0000 Subject: [PATCH] fixed problems. Sometimes Code was returned as unicode and not as local code --- lam/lib/cache.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lam/lib/cache.inc b/lam/lib/cache.inc index 2344434b..9f5b26ac 100644 --- a/lam/lib/cache.inc +++ b/lam/lib/cache.inc @@ -211,7 +211,9 @@ class cache { // unset every count entry unset ($attr['count']); $attributes = array_keys($attr); - foreach ($attributes as $attribute) unset ($attr[$attribute]['count']); + foreach ($attributes as $attribute) { + unset ($attr[$attribute]['count']); + } // unset double entries for ($i=0; $ildapcache[$scope][$dn] = $attr; $entry = ldap_next_entry($_SESSION['ldap']->server(), $entry); } @@ -306,7 +311,7 @@ class cache { if (is_array($dn_groups)) { $DNs = array_keys($dn_groups); foreach ($DNs as $DN) - $return[] = $dn_groups[$DN][0]; + $return[] = utf8_decode($dn_groups[$DN][0]); return $return; } return array(); @@ -322,7 +327,7 @@ class cache { $DNs = array_keys($dn_groups); foreach ($DNs as $DN) { if ($dn_groups[$DN][0]==$gidNumber) - $return = substr($DN, 3, strpos($DN, ',')-3); + $return = utf8_decode(substr($DN, 3, strpos($DN, ',')-3)); } return $return; }