Code

Use get_attribute for FAItemplateFile if it exists
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Jul 2009 11:13:33 +0000 (11:13 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Jul 2009 11:13:33 +0000 (11:13 +0000)
in the object, because it can be binary and would
otherwise be damaged.
(Trac: #2983)

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

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);