From 07074c29836c923f8f3d9e2a0a165b68fb9a0fe9 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 18 Apr 2006 13:35:23 +0000 Subject: [PATCH] Added fix to remove double listed / departments git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3055 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 2 +- include/functions.inc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/class_config.inc b/include/class_config.inc index 2da80f23c..db13e4ac9 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -277,7 +277,7 @@ class config { } /* Convert BASE to have escaped special characters */ - $this->current['BASE']= @LDAP::fix($this->current['BASE']); + $this->current['BASE']= @LDAP::convert($this->current['BASE']); /* Parse LDAP referral informations */ if (!isset($this->current['ADMIN']) || !isset($this->current['PASSWORD'])){ diff --git a/include/functions.inc b/include/functions.inc index 7c9427a60..52f0abbfb 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -836,7 +836,11 @@ function get_departments($ignore_dn= "") if ($dn == $ignore_dn){ continue; } - $result[convert_department_dn($dn)]= $dn; + + /* Only assign non-root departments */ + if ($dn != $result['/']){ + $result[convert_department_dn($dn)]= $dn; + } } return ($result); -- 2.30.2