Code

Updated FAI object detection.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Jul 2008 12:18:47 +0000 (12:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Jul 2008 12:18:47 +0000 (12:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11714 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
gosa-plugins/fai/admin/fai/class_faiVariable.inc

index 88683616057caae6e929838818c914b8bd850dfa..246bb794261dbbbf01bc083250a70791e36b7f6e 100644 (file)
@@ -48,6 +48,10 @@ class faiHook extends plugin
        */
       $res = FAI::get_all_objects_for_given_base($this->dn,"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
       foreach($res as $obj){
+
+        /* Skip not relevant objects */
+        if(!preg_match("/".normalizePreg($this->dn)."$/i",$obj['dn'])) continue;
+
         $objects = array();
         $objects['status']      = "FreshLoaded";
         $objects['dn']          = $obj['dn'];
index 4f471c07a7b13b183a6d94121bd99df541cad4da..a835d5190bb128afb2c7a65946c7db50a4d9e467 100644 (file)
@@ -53,6 +53,10 @@ class faiScript extends plugin
        */
       $res = FAI::get_all_objects_for_given_base($this->dn,"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
       foreach($res as $obj){
+
+        /* Skip not relevant objects */
+        if(!preg_match("/".normalizePreg($this->dn)."$/i",$obj['dn'])) continue;
+
         $objects = array();
         $objects['status']      = "FreshLoaded";
         $objects['dn']          = $obj['dn'];
index a96de25dd1116699eed4cb7299383c2e7e63b18f..6a8513d45757f4a40cbad13abbd1039c6f0eb4ba 100644 (file)
@@ -50,6 +50,10 @@ class faiTemplate extends plugin
        */
       $res = FAI::get_all_objects_for_given_base($this->dn,"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
       foreach($res as $obj){
+
+        /* Skip not relevant objects */
+        if(!preg_match("/".normalizePreg($this->dn)."$/i",$obj['dn'])) continue;
+
         $objects = array();
         $objects['status']      = "FreshLoaded";
         $objects['dn']          = $obj['dn'];
index 8380d5a7bf790bb18a9e2e5e2e6f70ac7dc30546..9390146c6688ce550fa67e0658db124bc2b1b685 100644 (file)
@@ -45,6 +45,10 @@ class faiVariable extends plugin
        */
       $res = FAI::get_all_objects_for_given_base($this->dn,"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
       foreach($res as $obj){
+
+        /* Skip not relevant objects */
+        if(!preg_match("/".normalizePreg($this->dn)."$/i",$obj['dn'])) continue;
+
         $objects = array();
         $objects['status']      = "FreshLoaded";
         $objects['dn']          = $obj['dn'];