Code

Department names fully shown if name contains /
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Sep 2005 05:43:31 +0000 (05:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Sep 2005 05:43:31 +0000 (05:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1275 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc
plugins/admin/departments/generic.tpl

index de391f92f4c7d764e37361dddc5dc8a3597210dc..3c85199dc2281f00a58e67aa39be85828e18225c 100644 (file)
@@ -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;
index a82ac8eba88537e11677404654076f9e4874da93..819e5aa3e14a1c9f8e4f0184a8305a5327d6836d 100644 (file)
@@ -43,7 +43,7 @@
 
      <table summary="">
       <tr>
-       <td><LABEL for="st">{t}State{/t}/</LABEL></td>
+       <td><LABEL for="st">{t}State{/t}</LABEL></td>
        <td><input id="st" name="st" size=25 maxlength=60 {$stACL} value="{$st}" title="{t}State where this subtree is located{/t}"></td>
       </tr>
       <tr>