Code

Don't copy over subobjects in subreleases if their
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Jul 2009 10:38:54 +0000 (10:38 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 3 Jul 2009 10:38:54 +0000 (10:38 +0000)
parent is in "removed" state

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13881 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 0278c5a1747f8d687f88a43308a71326bdbb4992..d8a993859b41c02335bfb2c80fdf81cb7ce51906 100644 (file)
@@ -518,11 +518,6 @@ class FAI
           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);
-              }
-             
               /* Only update the freeze tag if the entry actually exists. */
               $ldap->cat($key);
               if($ldap->count()){
@@ -531,7 +526,14 @@ class FAI
                 $rTag = FAI::get_release_tag(FAI::get_release_dn($key));
                 $parent_attrs['FAIstate'] = $rTag;
               }
-              FAI::save_FAI_object($key,$parent_attrs);
+              /* Don't copy over subobjects in subreleases if their parent is in "removed" state */
+              if(!FAI::parent_is_removed($key)){
+                if(DEBUG_FAI_FUNC) { 
+                  echo "<b>Copy current objects original attributes to next release</b> ".$key;
+                  print_a($parent_attrs);
+                }
+                FAI::save_FAI_object($key,$parent_attrs);
+              }
             }
           }