[BUGFIX] Element Browser uses FAL API in a wrong way
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Classes / Browser / ElementBrowser.php
index 7ce50d5..c1aeefd 100644 (file)
@@ -1472,7 +1472,11 @@ class ElementBrowser {
                        if ($renderFolders) {
                                $items = $folder->getSubfolders();
                        } else {
                        if ($renderFolders) {
                                $items = $folder->getSubfolders();
                        } else {
-                               $items = $folder->getFiles($extensionList);
+                               $filter = new \TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter();
+                               $filter->setAllowedFileExtensions($extensionList);
+                               $folder->getStorage()->setFileAndFolderNameFilters(array(array($filter, 'filterFileList')));
+
+                               $items = $folder->getFiles();
                        }
                        $c = 0;
                        $totalItems = count($items);
                        }
                        $c = 0;
                        $totalItems = count($items);
@@ -2189,4 +2193,4 @@ class ElementBrowser {
 }
 
 
 }
 
 
-?>
\ No newline at end of file
+?>