From d489f91dd37678e62d086d53af3a479307a224a9 Mon Sep 17 00:00:00 2001 From: Susanne Moog <susanne.moog@typo3.com> Date: Fri, 2 Jun 2017 12:20:37 +0200 Subject: [PATCH] [BUGFIX] Do not show hidden tables in LiveSearch LiveSearch did not check whether the tables were allowed to be shown (via TCA ctrl hideTable) and displayed results that were not available after clicking 'show all'. Change-Id: I90f61e1156c446cd399c0f26b96bbd30c747554d Releases: master, 8.7 Resolves: #75651 Reviewed-on: https://review.typo3.org/53026 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Johannes Goslar <jogo@kronberger-spiele.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Johannes Goslar <jogo@kronberger-spiele.de> --- .../backend/Classes/Search/LiveSearch/LiveSearch.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php b/typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php index 847934aebce9..7c035a5fad75 100644 --- a/typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php +++ b/typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php @@ -141,8 +141,14 @@ class LiveSearch $limit = $this->limitCount; $getRecordArray = []; foreach ($GLOBALS['TCA'] as $tableName => $value) { - // if no access for the table (read or write), skip this table - if (!$GLOBALS['BE_USER']->check('tables_select', $tableName) && !$GLOBALS['BE_USER']->check('tables_modify', $tableName)) { + // if no access for the table (read or write) or table is hidden, skip this table + if ( + ( + !$GLOBALS['BE_USER']->check('tables_select', $tableName) && + !$GLOBALS['BE_USER']->check('tables_modify', $tableName) + ) || + (isset($value['ctrl']['hideTable']) && $value['ctrl']['hideTable']) + ) { continue; } $recordArray = $this->findByTable($tableName, $pageIdList, 0, $limit); -- GitLab