[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>
Fri, 6 Jul 2012 17:45:40 +0000 (19:45 +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: Ie748bc96d80ea284bfb9a5519b2769bba7aa8749
Resolves: #18771
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/12659
Reviewed-by: Karsten Madsen
Tested-by: Karsten Madsen
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
t3lib/class.t3lib_div.php

index 2d35d80..77ac69c 100644 (file)
@@ -2998,7 +2998,7 @@ final class t3lib_div {
                                                                $sortarray[$key] = filemtime($path . '/' . $entry);
                                                        }
                                                        elseif ($order) {
                                                                $sortarray[$key] = filemtime($path . '/' . $entry);
                                                        }
                                                        elseif ($order) {
-                                                               $sortarray[$key] = $entry;
+                                                               $sortarray[$key] = strtolower($entry);
                                                        }
                                                }
                                        }
                                                        }
                                                }
                                        }