[FEATURE] Add DESC sorting for FILES-cObject
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / FilesContentObject.php
index 509a229..57cd322 100644 (file)
@@ -166,6 +166,9 @@ class FilesContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConte
                                        return 0;
                                }
                        });
+                       if (is_array($conf['sorting.']) && isset($conf['sorting.']['direction']) && strtolower($conf['sorting.']['direction']) === 'desc') {
+                               $fileObjects = array_reverse($fileObjects);
+                       }
                }
 
                $availableFileObjectCount = count($fileObjects);