Commit e91c2bb7 authored by Frank Nägler's avatar Frank Nägler Committed by Christian Kuhn
Browse files

[TASK] Remember search filter in PageModule

Bring session handling for search field also to the
PageModule. Now it works like in the ListModule.

Resolves: #63841
Related: #33627
Releases: master
Change-Id: I8ad351b73259345f406d29747a250cd3acd7f3d4
Reviewed-on: http://review.typo3.org/35420


Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 33f70c74
......@@ -258,6 +258,9 @@ class PageLayoutController {
$this->MCONF = $GLOBALS['MCONF'];
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
$this->backPath = $GLOBALS['BACK_PATH'];
// Get session data
$sessionData = $GLOBALS['BE_USER']->getSessionData(\TYPO3\CMS\Recordlist\RecordList::class);
$this->search_field = !empty($sessionData['search_field']) ? $sessionData['search_field'] : '';
// GPvars:
$this->id = (int)GeneralUtility::_GP('id');
$this->pointer = GeneralUtility::_GP('pointer');
......@@ -266,11 +269,20 @@ class PageLayoutController {
$this->popView = GeneralUtility::_GP('popView');
$this->edit_record = GeneralUtility::_GP('edit_record');
$this->new_unique_uid = GeneralUtility::_GP('new_unique_uid');
$this->search_field = GeneralUtility::_GP('search_field');
if (!empty(GeneralUtility::_GP('search_field'))) {
$this->search_field = GeneralUtility::_GP('search_field');
$sessionData['search_field'] = $this->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;
}
// Store session data
$GLOBALS['BE_USER']->setAndSaveSessionData(\TYPO3\CMS\Recordlist\RecordList::class, $sessionData);
// Load page info array:
$this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
// Initialize menu
......
Supports Markdown
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