[BUGFIX] Erroneous date sorting in File List 57/30657/2
authorFrancois Suter <francois@typo3.org>
Wed, 11 Jun 2014 09:38:24 +0000 (11:38 +0200)
committerXavier Perseguers <xavier@typo3.org>
Wed, 11 Jun 2014 10:30:22 +0000 (12:30 +0200)
The sorting by date fails in the Filelist module when more
than 9 files with the same date are found since the numerical
suffix used to avoid overwriting existing entries in the
sorting array is not properly padded.

Fixes: #59458
Releases: 6.2
Change-Id: I2c80a00dd1692b0987da3d461cc5a21fcea4c97d
Reviewed-on: https://review.typo3.org/30657
Reviewed-by: Francois Suter
Tested-by: Francois Suter
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/filelist/Classes/FileList.php

index cd69dc2..bfd10bb 100644 (file)
@@ -314,7 +314,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                                                $sortingKey = $fileObject->getName();
                                                        }
                                        }
-                                       $i = 0;
+                                       $i = 1000000;
                                        while (isset($filesToSort[$sortingKey . $i])) {
                                                $i++;
                                        }