Code

-Upated FAI classes (script/hook/template).
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Mar 2008 10:39:54 +0000 (10:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Mar 2008 10:39:54 +0000 (10:39 +0000)
Updated FAI searches, no overlapping searches anymore.

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

gosa-plugins/fai/admin/fai/class_faiHook.inc
gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiTemplate.inc

index 069cf0d57ee5c01622456d7a32d86a77d655d839..e150dc518081a0cace38b995685f8f9b6f893900 100644 (file)
@@ -58,7 +58,11 @@ class faiHook extends plugin
       $attrs_to_search[] = "FAIstate";
       $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))", $attrs_to_search);
 
+      $data = array();
       while($object = $ldap->fetch()){
+        $data[] = $object;
+      }
+      foreach($data as $object){
 
        /* Skip objects, that are tagged as removed */
         if(isset($object['FAIstate'][0])){
index c117220a6c7adc27824f12aafe05ebbb0eac55eb..33d9e0b3a55685698ea004abba6eded14e838c82 100644 (file)
@@ -64,8 +64,11 @@ class faiScript extends plugin
       $attrs_to_search = $this->subAttributes;
       $attrs_to_search[] = "FAIstate";
       $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search);
-
+      $data = array();
       while($object = $ldap->fetch()){
+        $data[] = $object;
+      }
+      foreach($data as $object){
 
         /* Skip objects, that are tagged as removed */
         if(isset($object['FAIstate'][0])){
index 9c1dd0c98a1e6a55e54e8d203a3f40c0dc3f1833..ffb910eac52dd750a0962ab809cc8951b38b8259 100644 (file)
@@ -61,7 +61,11 @@ class faiTemplate extends plugin
       $attrs_to_search[] = "FAIstate";
       $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search);
 
+      $data = array();
       while($object = $ldap->fetch()){
+        $data[] = $object;
+      }
+      foreach($data as $object){
 
         /* Skip objects, that are tagged as removed */
         if(isset($object['FAIstate'][0])){