[BUGFIX] Fix option to disable direct file upload 79/34979/3
authorSteffen Müller <typo3@t3node.com>
Mon, 24 Nov 2014 10:44:03 +0000 (11:44 +0100)
committerSteffen Müller <typo3@t3node.com>
Wed, 3 Dec 2014 14:08:49 +0000 (15:08 +0100)
Direct file uploads for FAL fields can be disabled
with ...['appearance']['fileUploadAllowed'] = FALSE

Resolves: #63286
Releases: master, 6.2
Change-Id: I8fd6bd7ab385ba8acc4c7d18fb38507dc8689dbc
Change-Id: Ic93ec8047d2db9205fdf10bb4bce63b1559ca728
Reviewed-on: http://review.typo3.org/34979
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 322bc81..895926c 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;
 
 /**
@@ -877,14 +878,15 @@ class InlineElement {
         * @todo Define visibility
         */
        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);
                }
@@ -931,6 +933,7 @@ class InlineElement {
                                $this->loadDragUploadJs();
                        }
                }
+
                return $item;
        }