From 1d4071367c5e2116dc214ccf0bee964ba1c166e0 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 1 Sep 2005 05:43:31 +0000 Subject: [PATCH] Department names fully shown if name contains / git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1275 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 10 +++++++--- plugins/admin/departments/generic.tpl | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index de391f92f..3c85199dc 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -758,11 +758,15 @@ function convert_department_dn2($dn) /* Build a sub-directory style list of the tree level specified in $dn */ + $deps = array_flip($_SESSION['config']->idepartments); + + $dn= $deps[$dn]; + $tmp = split (",", $dn); - $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $tmp[0]); - - +// $dep= preg_replace("%^.*/([^/]+)$%", "\\1", $tmp[0]); + $dep = preg_replace("/^.*=/","",$tmp[0]); + /* Return and remove accidently trailing slashes */ $tmp = rtrim($dep, "/"); return $tmp; diff --git a/plugins/admin/departments/generic.tpl b/plugins/admin/departments/generic.tpl index a82ac8eba..819e5aa3e 100644 --- a/plugins/admin/departments/generic.tpl +++ b/plugins/admin/departments/generic.tpl @@ -43,7 +43,7 @@ - + -- 2.30.2