From 1a3d5210a10adb8b2fc351ef29a2535c2d0d9f31 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 11 Aug 2008 08:47:10 +0000 Subject: [PATCH] Updated FAI class -Fixed error with duplicated objectClass in release creation. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12186 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_FAI.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc index ffa7427dc..ec75c333e 100644 --- a/gosa-plugins/fai/admin/fai/class_FAI.inc +++ b/gosa-plugins/fai/admin/fai/class_FAI.inc @@ -8,6 +8,21 @@ class FAI /* TEST PHASE .... */ + static function get_all_objects_for_given_object($dn,$filter,$detailed = false) + { + $res = FAI::get_all_objects_for_given_base($dn,$filter,$detailed); + $name = preg_replace("/,ou=.*$/","",$dn); + $entries = array(); + foreach($res as $entry_dn => $data){ + if(!preg_match("/,".$name.",/",$entry_dn)) continue; + $entries[$entry_dn] = $data; + } + return($entries); + } + + + + /* Returns all object for the given release. This function resolves the releases from base up to the given dn. @@ -1121,7 +1136,7 @@ class FAI } unset($attr['count']); unset($attr['dn']); - if(!in_array("FAIclass",$attr['objectClass'])){ + if(!in_array("FAIobject",$attr['objectClass'])){ $attr['objectClass'][] = "FAIobject"; } $attr['FAIstate'] = $type; -- 2.30.2