X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_ldap.inc;h=1e086ecb5b2486cc7f47ece760c23cccc8c01dcb;hb=d2a7f50083180fccb855c116a0f16cbca2636f62;hp=02cb696f9ad6a50966b94f2d22478350952a89ed;hpb=1a1cd62339c5c255de11b0d5b78649e067e7bc34;p=gosa.git diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 02cb696f9..1e086ecb5 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -645,7 +645,7 @@ class LDAP{ } $real_path= substr($target, 0, strlen($target) - strlen($this->basedn) -1 ); - $l= array_reverse(ldap_explode_dn($real_path,0)); + $l= array_reverse(gosa_ldap_explode_dn($real_path)); unset($l['count']); $cdn= $this->basedn; $tag= ""; @@ -826,7 +826,7 @@ class LDAP{ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $recursive= TRUE,$r_array=0) { - $display= ""; + $display= array(); $this->cd($dn); $this->search("$filter"); @@ -1098,7 +1098,7 @@ class LDAP{ if(isset($data['dn'])) { /* Fix dn */ - $tmp = ldap_explode_dn($data['dn'],0); + $tmp = gosa_ldap_explode_dn($data['dn']); unset($tmp['count']); $newdn =""; foreach($tmp as $tm){ @@ -1217,6 +1217,19 @@ class LDAP{ } } } + + /* added by Guido Serra aka Zeph */ + function getCn($dn){ + $simple= split(",", $dn); + + foreach($simple as $piece) { + $partial= split("=", $piece); + + if($partial[0] == "cn"){ + return $partial[1]; + } + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: