[BUGFIX] Allow removal of search term in Page / List module 43/39743/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 26 May 2015 13:52:00 +0000 (15:52 +0200)
committerFrank Nägler <typo3@naegler.net>
Mon, 1 Jun 2015 10:05:52 +0000 (12:05 +0200)
It wasn't possible to remove the search term used in the search
in the Page and List module below the docheader, because it was
checked for an empty submit button. The checks are removed now.

Resolves: #66552
Releases: master
Change-Id: I7113f5a00903326f9d12ee06b3510a376ff0f772
Reviewed-on: http://review.typo3.org/39743
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/recordlist/Classes/RecordList.php

index 3133a82..dbb8ea3 100644 (file)
@@ -268,18 +268,12 @@ class PageLayoutController {
                $this->popView = GeneralUtility::_GP('popView');
                $this->edit_record = GeneralUtility::_GP('edit_record');
                $this->new_unique_uid = GeneralUtility::_GP('new_unique_uid');
-               if (!empty(GeneralUtility::_GP('search_field'))) {
-                       $this->search_field = GeneralUtility::_GP('search_field');
-                       $sessionData['search_field'] = $this->search_field;
-               }
+               $this->search_field = GeneralUtility::_GP('search_field');
                $this->search_levels = GeneralUtility::_GP('search_levels');
                $this->showLimit = GeneralUtility::_GP('showLimit');
                $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->externalTables = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cms']['db_layout']['addTables'];
-               if (!empty(GeneralUtility::_GP('search')) && empty(GeneralUtility::_GP('search_field'))) {
-                       $this->search_field = '';
-                       $sessionData['search_field'] = $this->search_field;
-               }
+               $sessionData['search_field'] = $this->search_field;
                // Store session data
                $GLOBALS['BE_USER']->setAndSaveSessionData(\TYPO3\CMS\Recordlist\RecordList::class, $sessionData);
                // Load page info array:
index fe8a363..af131e6 100644 (file)
@@ -203,20 +203,14 @@ class RecordList {
                $this->pointer = GeneralUtility::_GP('pointer');
                $this->imagemode = GeneralUtility::_GP('imagemode');
                $this->table = GeneralUtility::_GP('table');
-               if (!empty(GeneralUtility::_GP('search_field'))) {
-                       $this->search_field = GeneralUtility::_GP('search_field');
-                       $sessionData['search_field'] = $this->search_field;
-               }
+               $this->search_field = GeneralUtility::_GP('search_field');
                $this->search_levels = (int)GeneralUtility::_GP('search_levels');
                $this->showLimit = GeneralUtility::_GP('showLimit');
                $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->clear_cache = GeneralUtility::_GP('clear_cache');
                $this->cmd = GeneralUtility::_GP('cmd');
                $this->cmd_table = GeneralUtility::_GP('cmd_table');
-               if (!empty(GeneralUtility::_GP('search')) && empty(GeneralUtility::_GP('search_field'))) {
-                       $this->search_field = '';
-                       $sessionData['search_field'] = $this->search_field;
-               }
+               $sessionData['search_field'] = $this->search_field;
                // Initialize menu
                $this->menuConfig();
                // Store session data