From 08be615cd362804deb3ebdbb63fffa5184c6e3b7 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 17 Oct 2006 11:24:46 +0000 Subject: [PATCH] Bloody fucking stuff git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4890 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiHook.inc | 10 +++++++++- plugins/admin/fai/class_faiScript.inc | 8 ++++++++ plugins/admin/fai/class_faiVariable.inc | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 6b41d8244..e0817a17c 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -62,9 +62,17 @@ class faiHook extends plugin $ldap->cd ($this->dn); $attrs_to_search = $this->subAttributes; $attrs_to_search[] = "FAIstate"; - $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))", array("dn")); + $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))", $attrs_to_search); while($object = $ldap->fetch()){ + + /* Skip objects, that are tagged as removed */ + if(isset($object['FAIstate'][0])){ + if(preg_match("/removed$/",$object['FAIstate'][0])){ + continue; + } + } + /* Set status for save management */ $objects = array(); $objects['status'] = "FreshLoaded"; diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index 73f536de1..5cbae0290 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -69,6 +69,14 @@ class faiScript extends plugin $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search); while($object = $ldap->fetch()){ + + /* Skip objects, that are tagged as removed */ + if(isset($object['FAIstate'][0])){ + if(preg_match("/removed$/",$object['FAIstate'][0])){ + continue; + } + } + /* Set status for save management */ $objects = array(); $objects['status'] = "FreshLoaded"; diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index 3e012aad1..c22d83898 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -58,7 +58,7 @@ class faiVariable extends plugin $attrs_to_search = $this->subAttributes; $attrs_to_search[] = "FAIstate"; - $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$this->subAttributes); + $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search); while($object = $ldap->fetch()){ -- 2.30.2