Code

Updated FAI
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Jul 2008 07:37:58 +0000 (07:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Jul 2008 07:37:58 +0000 (07:37 +0000)
-In we modifed an inherited object, the FAIstate wasn't updated for freezed objects.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11709 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_FAI.inc

index fd763df9f884622f1c406e363bef7e8fdc5f2bf5..e2421b4430e5c1b4a8cf0671de17ccfc7d910ac0 100644 (file)
@@ -369,9 +369,9 @@ class FAI
 
       /* Get some basic informations */
       $base_release       = FAI::get_release_dn($Current_DN);
-      $sub_releases       = FAI::                       get_sub_releases_of_this_release($base_release,true);
+      $sub_releases       = FAI::get_sub_releases_of_this_release($base_release,true);
       $parent_obj         = FAI::get_parent_release_object($Current_DN);
-      $following_releases = FAI::                       get_sub_releases_of_this_release($base_release,true);
+      $following_releases = $sub_releases;
 
       /* Check if given dn exists or if is a new entry */
       $ldap->cat($Current_DN);
@@ -495,11 +495,17 @@ class FAI
 
           /* check if we must patch the follwing release */
           if(!empty($r)){
+
             foreach($r as $key ){
               if(DEBUG_FAI_FUNC) { 
                 echo "<b>Copy current objects original attributes to next release</b> ".$key;
                 print_a($parent_attrs);
               }
+             
+              /* Append FAIstate tag to ensure that freezed objects stay freezed
+               */ 
+              $rTag = FAI::get_release_tag(FAI::get_release_dn($key));
+              $parent_attrs['FAIstate'] = $rTag;
               FAI::save_FAI_object($key,$parent_attrs);
             }
           }