Bug #18771
Order in t3lib_div::getFilesInDir is different from order in File list
| Status: | Resolved | Start date: | 2008-05-11 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Benjamin Mack | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.2 | Complexity: | ||
| PHP Version: | 5.2 | |||
| Votes: | 2 (View) |
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)
Associated revisions
[BUG] t3lib_div::getFilesInDir order differs from order in File list
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
[BUG] t3lib_div::getFilesInDir order differs from order in File list
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
[BUG] t3lib_div::getFilesInDir order differs from order in Filelist
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: Ib7f69f91f57c5a4ec76d95a879ce86ada8288f13
Resolves: #18771
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/12686
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[BUG] t3lib_div::getFilesInDir order differs from order in File list
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: Idfedab734d0a40795a52c117ae79d45052f174bd
Resolves: #18771
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/12687
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[BUG] t3lib_div::getFilesInDir order differs from order in File list
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
History
Updated by Benjamin Mack 11 months ago
- Target version deleted (
0)
Note: To reproduce this, check linking on a file, the file list there uses t3lib_div::getFilesInDir() - the file list module works as expected as it does not use this function.
Updated by Gerrit Code Review 11 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12659
Updated by Gerrit Code Review 11 months ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12659
Updated by Benjamin Mack 11 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 11504997bc4ebe26aa6f5f517c1516804f6d4b9a.
Updated by Gerrit Code Review 11 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/12685
Updated by Gerrit Code Review 11 months ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12686
Updated by Gerrit Code Review 11 months ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12687
Updated by Benjamin Mack 11 months ago
- Status changed from Under Review to Resolved
Applied in changeset 8d29e26aca7af38eae349cc5a3e0cb5ee3fab2bd.
Updated by Gerrit Code Review 10 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13195
Updated by Gerrit Code Review 10 months ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13299
Updated by Alexander Opitz 15 days ago
- Status changed from Under Review to Resolved
This issue was resolved, the two last gerrit code review message seem to be wrong.