Code

Updated DAK.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 09:34:27 +0000 (09:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Jun 2008 09:34:27 +0000 (09:34 +0000)
Only list server, we are allowed to view.

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

gosa-plugins/dak/addons/dak/class_DAK.inc

index 085bad7addc59bf107cc58529fcb7eea11b2fad2..79da99fb7250aa91fdf6f575f0571f04b76e6058 100644 (file)
@@ -44,10 +44,11 @@ class DAK
       return;
     }
     $res = array();
-    $ldap = $config->get_ldap_link();
-    $ldap->cd($config->current['BASE']);
-    $ldap->search("(&(macAddress=*)(FAIrepository=*)(objectClass=FAIrepositoryServer))",array("cn","FAIrepository","macAddress"));
-    while($attrs = $ldap->fetch()){
+    $rest = get_sub_list("(&(macAddress=*)(FAIrepository=*)(objectClass=FAIrepositoryServer))",
+        "server",get_ou("serverou"),$config->current['BASE'],
+        array("cn","FAIrepository","macAddress"),GL_SUBSEARCH);
+
+    foreach($rest as $attrs){
       $serv = array();
       $serv['REPOSITORIES'] = array();
       for($i = 0 ; $i < $attrs['FAIrepository']['count'] ; $i ++){