From 29b2315fcec54f808e2b3dddb8990c474596aea2 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 18 Jul 2008 12:18:47 +0000 Subject: [PATCH] Updated FAI object detection. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11714 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiHook.inc | 4 ++++ gosa-plugins/fai/admin/fai/class_faiScript.inc | 4 ++++ gosa-plugins/fai/admin/fai/class_faiTemplate.inc | 4 ++++ gosa-plugins/fai/admin/fai/class_faiVariable.inc | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index 886836160..246bb7942 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -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']; diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index 4f471c07a..a835d5190 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -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']; diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index a96de25dd..6a8513d45 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -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']; diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc index 8380d5a7b..9390146c6 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -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']; -- 2.30.2