[BUGFIX] Respect selected page in recursive record list search 42/53242/2
authorSascha Egerer <sascha@sascha-egerer.de>
Sat, 20 May 2017 06:56:15 +0000 (08:56 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Sat, 17 Jun 2017 15:47:51 +0000 (17:47 +0200)
The backend list view must respect the selected pages even if the search
level is set to infinite. This bug was introduced by the Doctrine
migration.

Resolves: #81278
Releases: master,8.7
Change-Id: I6ab0e93a019a001f9df08e00c01f7525a6621284
Reviewed-on: https://review.typo3.org/53242
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php

index 4a88bb3..42276a5 100644 (file)
@@ -1405,6 +1405,12 @@ class AbstractDatabaseRecordList extends AbstractRecordList
         // Set search levels:
         $searchLevels = $this->searchLevels;
 
+        // Set search levels to 999 instead of -1 as the following methods
+        // do not support -1 as valid value for infinite search.
+        if ($searchLevels === -1) {
+            $searchLevels = 999;
+        }
+
         // Default is to search everywhere
         $constraint = '1=1';