Code

Fixed convert_department_dn.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 09:38:49 +0000 (09:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 09:38:49 +0000 (09:38 +0000)
-if ou= was part of the dn, the generated result was invalid.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10497 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc
gosa-core/plugins/admin/departments/class_departmentManagement.inc

index 961abc56a65296dd2956d70ccedb1935c1750b08..08626e248e47382e578ea438ae417740b2aceaf2 100644 (file)
@@ -1093,6 +1093,10 @@ function convert_department_dn($dn)
 
   /* Build a sub-directory style list of the tree level
      specified in $dn */
+  global $config;
+  $dn = preg_replace("/".normalizePreg($config->current['BASE'])."$/i","",$dn);
+  if(empty($dn)) return("/");
+
   foreach (split(',', $dn) as $rdn){
 
     /* We're only interested in organizational units... */
index 43b92fd64cf0ab734c7cc9711cd5be60b032ebbf..d2ce73f68b5a5c5bd1b2e4969d96187858246b34 100644 (file)
@@ -453,6 +453,7 @@ class departmentManagement extends plugin
     }
     natcasesort ($this->departments);
     reset ($this->departments);
+    print_a($this->departments) ;
   }
 
   function remove_from_parent()