From 4065059c4e54586c8ca0af43615016c163e2019f Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 11 Mar 2010 13:09:22 +0000 Subject: [PATCH] Updated navigator git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16454 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_pathNavigator.inc | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_pathNavigator.inc b/gosa-core/include/class_pathNavigator.inc index cc280955a..1ebb7d42a 100644 --- a/gosa-core/include/class_pathNavigator.inc +++ b/gosa-core/include/class_pathNavigator.inc @@ -6,7 +6,7 @@ class pathNavigator static function registerPlugin($class) { - $str = ""; + $str = $title = ""; // Display headline of management plugins if($class instanceOf management && isset($class->plHeadline)){ @@ -24,7 +24,22 @@ class pathNavigator // In case of tabs add the 'dn' of the entry if($class instanceOf tabs){ - $str = $class->dn; + + // Convert dn to cn + if(isset($class->dn)){ + 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]; + } + session::set("pathNavigator::registerPlugin:{$class->dn}", $str); + } + $str = session::get("pathNavigator::registerPlugin:{$class->dn}"); + $title = $class->dn; + } } // Simple string given @@ -34,10 +49,13 @@ class pathNavigator if(!empty($str)){ $cur = session::get('pathNavigator::position'); + + if(!empty($title)) $title = " title='{$title}' "; + if(empty($cur)){ - $cur.= "
  • {$str}
  • "; + $cur.= "\n
  • {$str}
  • "; }else{ - $cur.= "
  • {$str}
  • "; + $cur.= "\n
  • {$str}
  • "; } session::set('pathNavigator::position', $cur); } -- 2.30.2