[TASK] Show by default only 1 file upload field in elementbrowser 99/28699/2
authorFrans Saris <franssaris@gmail.com>
Mon, 24 Mar 2014 13:26:48 +0000 (14:26 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 25 Mar 2014 13:30:05 +0000 (14:30 +0100)
Since the input type=file now supports multiple file selection
and this is suppoterd by all modern browsers.
So showing only 1 filepicker by default is enough.

For users with older browser they can use the already existing
options.folderTree.uploadFieldsInLinkBrowser tsconfig to show
multiple fields.

This patch changes the hardcoded default value to 1.

Resolves: #57170
Releases: 6.2
Change-Id: Ia2dfcc3ae81dff66ba4c389a4b99b819186f63c0
Reviewed-on: https://review.typo3.org/28699
Reviewed-by: Philipp Gampe
Reviewed-by: Sebastian Fischer
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index b183b94..2c9e8c1 100644 (file)
@@ -2423,11 +2423,11 @@ class ElementBrowser {
                }
                // Read configuration of upload field count
                $userSetting = $GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.uploadFieldsInLinkBrowser');
-               $count = isset($userSetting) ? $userSetting : 3;
+               $count = isset($userSetting) ? $userSetting : 1;
                if ($count === '0') {
                        return '';
                }
-               $count = (int)$count === 0 ? 3 : (int)$count;
+               $count = (int)$count === 0 ? 1 : (int)$count;
                // Create header, showing upload path:
                $header = $folderObject->getIdentifier();
                $code = '