Code

Bloody fucking stuff
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Oct 2006 11:24:46 +0000 (11:24 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 17 Oct 2006 11:24:46 +0000 (11:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4890 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiHook.inc
plugins/admin/fai/class_faiScript.inc
plugins/admin/fai/class_faiVariable.inc

index 6b41d82449a0be22094fcc9aa10107098622f619..e0817a17c764570f1a435f734c24e13aa9a26b18 100644 (file)
@@ -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";
index 73f536de1a6382ed2ebf5c03c1940b08daf624a5..5cbae02905e8be1cabc720be914c63b147166eca 100644 (file)
@@ -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";
index 3e012aad146851b7707eed33bde197364dcfcd8d..c22d8389845a668e66d2202078a5e0ab64d8f617 100644 (file)
@@ -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()){