[BUGFIX] Element file browser respects allowedExtensions 73/54573/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 1 Nov 2017 13:05:33 +0000 (14:05 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 6 Nov 2017 23:18:30 +0000 (00:18 +0100)
The type=input, renderType=inputLink field control has an option
"allowedExtensions" to restrict the file element browser to specific
file endings. This option is now correctly considered in file browser.

Change-Id: Ic42bd0de06002f308d7db4098c704ca2574e4018
Resolves: #82861
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54573
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php

index 21dd8d9..a83adeb 100644 (file)
@@ -132,8 +132,8 @@ class FileLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
             // Render the file or folderlist
             if ($selectedFolder->checkActionPermission('read')) {
                 $this->view->assign('selectedFolder', $selectedFolder);
-                $parameters = $this->linkBrowser->getUrlParameters();
-                $allowedExtensions = isset($parameters['allowedExtensions']) ? $parameters['allowedExtensions'] : '';
+                $parameters = $this->linkBrowser->getParameters();
+                $allowedExtensions = $parameters['params']['allowedExtensions'] ?? '';
                 $this->expandFolder($selectedFolder, $allowedExtensions);
             }
         }