From a9c1e92298c1e4a6c0fa645ee352712ede4f60fd Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 Mar 2008 10:39:54 +0000 Subject: [PATCH] -Upated FAI classes (script/hook/template). 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 | 4 ++++ gosa-plugins/fai/admin/fai/class_faiScript.inc | 5 ++++- gosa-plugins/fai/admin/fai/class_faiTemplate.inc | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index 069cf0d57..e150dc518 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -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])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index c117220a6..33d9e0b3a 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -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])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index 9c1dd0c98..ffb910eac 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -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])){ -- 2.30.2