summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f6c176)
raw | patch | inline | side by side (parent: 7f6c176)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 10:03:05 +0000 (10:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 10:03:05 +0000 (10:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16738 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_pathNavigator.inc | patch | blob | history |
index 520f03d75f69c16a75815cfa09dcd24ea76351e0..1fe3908b5408d893c99baccf40de7ecceb898392 100644 (file)
if(!session::is_set("pathNavigator::registerPlugin:{$class->dn}")){
global $config;
$ldap = $config->get_ldap_link();
- $ldap->cat($class->dn, array('cn'));
- if($ldap->count()){
- $attrs = $ldap->fetch();
- $str = $attrs['cn'][0];
+
+ if(!empty($class->dn)){
+ $namingAttr = preg_replace("/^([^=]*)=.*$/","\\1",$class->dn);
+
+ $ldap->cat($class->dn, array($namingAttr));
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ $str = $attrs[$namingAttr][0];
+ }
+ session::set("pathNavigator::registerPlugin:{$class->dn}", $str);
}
- session::set("pathNavigator::registerPlugin:{$class->dn}", $str);
}
$str = session::get("pathNavigator::registerPlugin:{$class->dn}");
if(empty($title)){