Code

Added FAI tagging fix for missing "gosaAdministrativeUnitTag"
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 May 2006 09:16:06 +0000 (09:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 May 2006 09:16:06 +0000 (09:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3264 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackage.inc

index f634e130506c898c5dbf814c7f8d308cd9e889ba..70d2096d4fbeb2e4abb5911e97fc7d9afdfbb176 100644 (file)
@@ -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();