Code

Added fix to remove double listed / departments
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Apr 2006 13:35:23 +0000 (13:35 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Apr 2006 13:35:23 +0000 (13:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3055 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_config.inc
include/functions.inc

index 2da80f23c3cc9233654e06c021dbe14836844b52..db13e4ac94acf64ec3827941a71827f981737ccc 100644 (file)
@@ -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'])){
index 7c9427a6062cdde50d1e0f189917281ed622daeb..52f0abbfb5840bd2f77394995836315507d4d064 100644 (file)
@@ -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);