Code

Use get_attribute for FAItemplateFile if it exists
[gosa.git] / trunk / gosa-plugins / fai / admin / fai / class_FAI.inc
index bb0e295e55a0ed583d6507be4c2aead135166e3a..a1532602236526decbe6c3e7e2cf689103d885ac 100644 (file)
@@ -524,6 +524,11 @@ class FAI
               $parent_attrs['FAIstate'] = $rTag;
               /* Don't copy over subobjects in subreleases if their parent is in "removed" state */
               if(!FAI::parent_is_removed($key)){
+                /* FAItemplateFile can be binary, therefore it needs to be fetched with
+                 * $ldap->get_attribute */
+                if (isset($parent_attrs['FAItemplateFile'])) {
+                  $parent_attrs['FAItemplateFile'] = $ldap->get_attribute($parent_obj, 'FAItemplateFile');
+                }
                 if(DEBUG_FAI_FUNC) { 
                   echo "<b>Copy current objects original attributes to next release</b> ".$key;
                   print_a($parent_attrs);