From c8ec536c0b14f1c4f52330b3801bbcab0d0befac Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 May 2006 09:16:06 +0000 Subject: [PATCH] Added FAI tagging fix for missing "gosaAdministrativeUnitTag" git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3264 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiPackage.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index f634e1305..70d2096d4 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -467,13 +467,16 @@ class faiPackage extends plugin /* Save Package configurations */ foreach($this->ConfiguredPackages as $pkgname => $attrs){ foreach($attrs as $name => $attr){ + + $pkgattrs = array(); foreach($attr as $n=>$v){ if(empty($v)) $v = array(); } /* Set attributes */ - $pkgattrs['objectClass'] = "FAIdebconfInfo"; + $pkgattrs['objectClass'][] = "FAIdebconfInfo"; + $pkgattrs['FAIpackage'] = $pkgname; $pkgattrs['FAIvariable'] = $name; $pkgattrs['FAIvariableType'] = $attr['Type']; @@ -481,7 +484,14 @@ class faiPackage extends plugin $pkgdn = "FAIvariable=".$name.",".$this->dn; /* cehck if object already exists */ - $ldap->cat($pkgdn); + $ldap->cat($pkgdn,array("objectClass")); + + /* Workaround for missing "gosaAdministrativeUnitTag" */ + $attrs = $ldap->fetch(); + if((isset($attrs['objectClass'])) && (in_array_ics("gosaAdministrativeUnitTag",$attrs['objectClass']))){ + $pkgattrs['objectClass'][] = "gosaAdministrativeUnitTag"; + } + if($ldap->count()!=0){ $ldap->cd($pkgdn); $this->cleanup(); -- 2.30.2