[BUGFIX] Sorting files in filelist is case sentive
[Packages/TYPO3.CMS.git] / typo3 / sysext / filelist / Classes / FileList.php
index c4e8b5d..28805ea 100644 (file)
@@ -304,10 +304,9 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                        }
                                        $filesToSort[$sortingKey . $i] = $fileObject;
                                }
+                               uksort($filesToSort, 'strnatcasecmp');
                                if (intval($this->sortRev) === 1) {
-                                       krsort($filesToSort);
-                               } else {
-                                       ksort($filesToSort);
+                                       $filesToSort = array_reverse($filesToSort);
                                }
                                $files = $filesToSort;
                        }