diff --git a/src/MadeYourDay/Contao/CustomElements.php b/src/MadeYourDay/Contao/CustomElements.php index 56fe23e..79e869c 100644 --- a/src/MadeYourDay/Contao/CustomElements.php +++ b/src/MadeYourDay/Contao/CustomElements.php @@ -138,11 +138,10 @@ public function loadCallback($value, $dc) $value = $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['default']; } - if ( - version_compare(VERSION, '3.2', '>=') && - $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree' && - $value - ) { + if (version_compare(VERSION, '3.2', '>=') && $value && ( + $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree' + || $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fineUploader' + )) { // Multiple files if (substr($value, 0, 2) === 'a:') { $value = serialize(array_map(function($value) { @@ -288,10 +287,10 @@ public function saveCallback($value, $dc) return; } - if ( - version_compare(VERSION, '3.2', '>=') && + if (version_compare(VERSION, '3.2', '>=') && ( $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree' - ) { + || $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fineUploader' + )) { if (trim($value)) { if (strlen($value) === 16) { $value = \String::binToUuid($value); @@ -1491,7 +1490,10 @@ protected function convertDataForImportExportParseFields($import, $data, $config } // UUIDs to paths and vice versa - else if ($fieldConfig['inputType'] === 'fileTree' && $value) { + else if ($value && ( + $fieldConfig['inputType'] === 'fileTree' + || $fieldConfig['inputType'] === 'fineUploader' + )) { if (empty($fieldConfig['eval']['multiple'])) {