[BUGFIX] Use proper fallback value of files per page in file list module 03/57003/2
authorOliver Hader <oliver@typo3.org>
Fri, 18 May 2018 10:31:42 +0000 (12:31 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Fri, 18 May 2018 10:42:14 +0000 (12:42 +0200)
In case TSconfig options.file_list.filesPerPage is not defined the
resulting value falls back to 1 - however this should be the same as
defined in FileList::$iLimit, which is 40 per default.

Resolves: #85043
Releases: master
Change-Id: I33b024b81697350aeae54251e1ea66a36efc4d43
Reviewed-on: https://review.typo3.org/57003
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/filelist/Classes/FileList.php

index bd36bc0..6d1e9f2 100644 (file)
@@ -289,7 +289,7 @@ class FileList
         $this->fileListController = $fileListController;
         $this->thumbnailConfiguration = GeneralUtility::makeInstance(ThumbnailConfiguration::class);
         $this->iLimit = MathUtility::forceIntegerInRange(
-            $backendUser->getTSConfig()['options.']['file_list.']['filesPerPage'] ?? 1,
+            $backendUser->getTSConfig()['options.']['file_list.']['filesPerPage'] ?? $this->iLimit,
             1
         );
     }