[BUGFIX] Fix option to disable direct file upload 35/34535/2
authorSteffen Müller <typo3@t3node.com>
Mon, 24 Nov 2014 10:44:03 +0000 (11:44 +0100)
committerSteffen Müller <typo3@t3node.com>
Tue, 2 Dec 2014 09:57:13 +0000 (10:57 +0100)
Direct file uploads for FAL fields can be disabled
with ...['appearance']['fileUploadAllowed'] = FALSE

Resolves: #63286
Releases: master, 6.2
Change-Id: I8fd6bd7ab385ba8acc4c7d18fb38507dc8689dbc
Reviewed-on: http://review.typo3.org/34535
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Steffen Müller <typo3@t3node.com>
Tested-by: Steffen Müller <typo3@t3node.com>
typo3/sysext/backend/Classes/Form/Element/InlineElement.php

index f09e8fe..a605806 100644 (file)
@@ -20,6 +20,7 @@ use TYPO3\CMS\Core\Database\RelationHandler;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
 
 /**
@@ -870,14 +871,15 @@ class InlineElement {
         * @return string A HTML link that opens an element browser in a new window
         */
        public function renderPossibleRecordsSelectorTypeGroupDB($conf, &$PA) {
-               $foreign_table = $conf['foreign_table'];
                $config = $PA['fieldConf']['config'];
+               ArrayUtility::mergeRecursiveWithOverrule($config, $conf);
+               $foreign_table = $config['foreign_table'];
                $allowed = $config['allowed'];
                $objectPrefix = $this->inlineNames['object'] . self::Structure_Separator . $foreign_table;
                $mode = 'db';
                $showUpload = FALSE;
-               if (!empty($conf['appearance']['createNewRelationLinkTitle'])) {
-                       $createNewRelationText = $GLOBALS['LANG']->sL($conf['appearance']['createNewRelationLinkTitle'], TRUE);
+               if (!empty($config['appearance']['createNewRelationLinkTitle'])) {
+                       $createNewRelationText = $GLOBALS['LANG']->sL($config['appearance']['createNewRelationLinkTitle'], TRUE);
                } else {
                        $createNewRelationText = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.createNewRelation', TRUE);
                }
@@ -924,6 +926,7 @@ class InlineElement {
                                $this->loadDragUploadJs();
                        }
                }
+
                return $item;
        }