[BUGFIX] Sorting files in filelist is case sentive 89/19189/2
authorNicole Cordes <typo3@cordes.co>
Fri, 22 Mar 2013 11:55:45 +0000 (12:55 +0100)
committerBenjamin Mack <benni@typo3.org>
Fri, 22 Mar 2013 16:14:53 +0000 (17:14 +0100)
The sorting for files in the filelist is case sensitive while the sorting
for folders is not. The sorting should be adjusted to be identical for
files and folders.

Change-Id: I2aee28f42beb1f9b4b1eb969ee5503fd9bea0e23
Fixes: #46541
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19189
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/filelist/Classes/FileList.php

index 98694f0..6581176 100644 (file)
@@ -297,10 +297,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;
                        }
@@ -759,4 +758,4 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
 }
 
 
-?>
\ No newline at end of file
+?>