[BUGFIX] Fix Livesearch for Editors 38/48438/4
authorMarcus Schwemer <ms@schwemer.de>
Fri, 3 Jun 2016 09:41:14 +0000 (11:41 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 8 Jun 2016 19:35:53 +0000 (21:35 +0200)
Fix searchlevel comparision for editors using pageUID "0" in livesearch,
because "-1" is also a valid searchlevel.

Resolves: #76432
Releases: master, 7.6
Change-Id: I62a2059a7c7f8cf602e452bc0763c6c2cc3fbbe8
Reviewed-on: https://review.typo3.org/48438
Tested-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Dominique Kreemers <dominique.kreemers@icloud.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/recordlist/Classes/RecordList.php

index 637e832..f06f46d 100755 (executable)
@@ -372,7 +372,7 @@ class RecordList extends AbstractModule
         // It is set, if the clickmenu-layer is active AND the extended view is not enabled.
         $dblist->dontShowClipControlPanels = ($dblist->clipObj->current == 'normal' && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers']);
         // If there is access to the page or root page is used for searching, then render the list contents and set up the document template object:
-        if ($access || ($this->id === 0 && $this->search_levels > 0 && $this->search_field !== '')) {
+        if ($access || ($this->id === 0 && $this->search_levels !== 0 && $this->search_field !== '')) {
             // Deleting records...:
             // Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
             if ($this->cmd == 'delete') {