From 4cf88d6d23197d3f0c4b87f649b54ce8f4aba84e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 16 Apr 2008 09:38:49 +0000 Subject: [PATCH] Fixed convert_department_dn. -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 | 4 ++++ .../plugins/admin/departments/class_departmentManagement.inc | 1 + 2 files changed, 5 insertions(+) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 961abc56a..08626e248 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -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... */ diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 43b92fd64..d2ce73f68 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -453,6 +453,7 @@ class departmentManagement extends plugin } natcasesort ($this->departments); reset ($this->departments); + print_a($this->departments) ; } function remove_from_parent() -- 2.30.2