#18771Order in t3lib_div::getFilesInDir is different from order in File list
Description
On my webserver, I can added some “a” in front of a filename to make this file beeing the first in the order. In the file list in backend, it looked great. “a_newfile.jpg” was on top of the list before all the other “IMG_foo.jpg” files.
The plugin uses t3lib_div::getFilesInDir() to get the files from the file system and it returned the files in an other order. All files, starting with upper case are returned before all files with lower case.
I changed line 2865 of class.t3lib_div.php:
// original
// elseif ($order) {$sortarray[$key]=$entry;}
// my modification
elseif ($order) {$sortarray[$key]=strtolower($entry);}
now it works as I expect it
(issue imported from #M8373)
Reviews 4
- main 12659[BUG] t3lib_div::getFilesInDir order differs from order in File list
- TYPO3_4-6 12686[BUG] t3lib_div::getFilesInDir order differs from order in Filelist
- TYPO3_4-7 12687[BUG] t3lib_div::getFilesInDir order differs from order in File list
- TYPO3_4-5 12685[BUG] t3lib_div::getFilesInDir order differs from order in File list