Skip to content
Snippets Groups Projects
Commit ccc30d4b authored by Andreas Nedbal's avatar Andreas Nedbal Committed by Benjamin Franzke
Browse files

[BUGFIX] Fix sorting in FileBrowser

Apply sorting params passed in the request
to the element browser filelist.

Resolves: #100949
Releases: main, 12.4
Change-Id: I60244c66f481ce26f03d672754935dd7902befc7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79919


Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 96137365
Branches
Tags
No related merge requests found
......@@ -119,7 +119,13 @@ class FileBrowser extends AbstractResourceBrowser
$markup[] = '</div>';
// Create the filelist
$this->filelist->start($this->selectedFolder, MathUtility::forceIntegerInRange($this->currentPage, 1, 100000), 'asc', false, Mode::BROWSE);
$this->filelist->start(
$this->selectedFolder,
MathUtility::forceIntegerInRange($this->currentPage, 1, 100000),
$this->getRequest()->getQueryParams()['sort'] ?? 'asc',
($this->getRequest()->getQueryParams()['reverse'] ?? '') === '1',
Mode::BROWSE
);
$this->filelist->setResourceDisplayMatcher($this->resourceDisplayMatcher);
$this->filelist->setResourceSelectableMatcher($this->resourceSelectableMatcher);
$searchDemand = $this->searchWord !== ''
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment