[BUG] t3lib_div::getFilesInDir order differs from order in File list
authorBenjamin Mack <benni@typo3.org>
Fri, 6 Jul 2012 08:58:54 +0000 (10:58 +0200)
committerBenjamin Mack <benni@typo3.org>
Sat, 7 Jul 2012 09:18:18 +0000 (11:18 +0200)
Files with uppercase letters are sorted before all lowercase file
names due to a bug in getFilesInDir(). This behavior is seen in
the browse_links function, but not in the general file list module.
The fix does the sorting independently from the uppercase
characters.

Change-Id: I4bdacfe1644f2ac32b5b9173fa63ab6a11c78c07
Resolves: #18771
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/12685
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
t3lib/class.t3lib_div.php

index 9887e5a..ddd25f7 100644 (file)
@@ -3455,7 +3455,7 @@ final class t3lib_div {
                                                                $sortarray[$key] = filemtime($path . '/' . $entry);
                                                        }
                                                        elseif ($order) {
-                                                               $sortarray[$key] = $entry;
+                                                               $sortarray[$key] = strtolower($entry);
                                                        }
                                                }
                                        }