From 5d994a998e36dba7f76651a544b87e612ab252f7 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Mar 2010 10:03:05 +0000 Subject: [PATCH] Updated pathNavigator git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16738 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_pathNavigator.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_pathNavigator.inc b/gosa-core/include/class_pathNavigator.inc index 520f03d75..1fe3908b5 100644 --- a/gosa-core/include/class_pathNavigator.inc +++ b/gosa-core/include/class_pathNavigator.inc @@ -30,12 +30,17 @@ class pathNavigator 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)){ -- 2.30.2