Code

Updated LDAP server array.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 15:01:23 +0000 (15:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 15:01:23 +0000 (15:01 +0000)
-Add 'dn' to list of LDAP server, to be able to check acls

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

gosa-core/include/class_config.inc

index 0a51ba7724a551eb1030acdd1bc82b4dcc05a71a..85a5d88a59dfd5748c6055776521778640473dbb 100644 (file)
@@ -585,16 +585,13 @@ class config  {
       }
     }
 
-    /* Ldap Server */
+    /* Ldap Server 
+     */
     $this->data['SERVERS']['LDAP']= array();
     $ldap->cd ($this->current['BASE']);
-    $ldap->search ("(objectClass=goLdapServer)");
+    $ldap->search ("(&(objectClass=goLdapServer)(goLdapBase=*))");
     while ($attrs= $ldap->fetch()){
-      if (isset($attrs["goLdapBase"])){
-        for ($i= 0; $i<$attrs["goLdapBase"]["count"]; $i++){
-          $this->data['SERVERS']['LDAP'][]= $attrs["cn"][0].":".$attrs["goLdapBase"][$i];
-        }
-      }
+      $this->data['SERVERS']['LDAP'][$attrs['dn']] = $attrs;
     }
 
     /* Get misc server lists */