Commit 4786efbb authored by Tina Westner's avatar Tina Westner Committed by Christian Kuhn
Browse files

[BUGFIX] Fixes search with search type "sentence"

With this commit the method getSearchWords is called
after initializing $this->searchData, which is used there (only when
searchType is 20 - search for "sentence")

Resolves: #75845
Releases: master, 10.4
Change-Id: Ic344f05fb6f4ac1ef496907edfc4fa0e49010401
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68369


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d25eeccd
...@@ -231,7 +231,6 @@ class SearchController extends ActionController ...@@ -231,7 +231,6 @@ class SearchController extends ActionController
if ($searchData['sword_prev_include'] && $searchData['sword_prev']) { if ($searchData['sword_prev_include'] && $searchData['sword_prev']) {
$this->setSword(trim($searchData['sword_prev']) . ' ' . $this->getSword()); $this->setSword(trim($searchData['sword_prev']) . ' ' . $this->getSword());
} }
$this->searchWords = $this->getSearchWords($searchData['defaultOperand']);
// This is the id of the site root. // This is the id of the site root.
// This value may be a commalist of integer (prepared for this) // This value may be a commalist of integer (prepared for this)
$this->searchRootPageIdList = (int)$GLOBALS['TSFE']->config['rootLine'][0]['uid']; $this->searchRootPageIdList = (int)$GLOBALS['TSFE']->config['rootLine'][0]['uid'];
...@@ -249,6 +248,8 @@ class SearchController extends ActionController ...@@ -249,6 +248,8 @@ class SearchController extends ActionController
$this->searchRepository = GeneralUtility::makeInstance(IndexSearchRepository::class); $this->searchRepository = GeneralUtility::makeInstance(IndexSearchRepository::class);
$this->searchRepository->initialize($this->settings, $searchData, $this->externalParsers, $this->searchRootPageIdList); $this->searchRepository->initialize($this->settings, $searchData, $this->externalParsers, $this->searchRootPageIdList);
$this->searchData = $searchData; $this->searchData = $searchData;
// $this->searchData is used in $this->getSearchWords
$this->searchWords = $this->getSearchWords($searchData['defaultOperand']);
// Calling hook for modification of initialized content // Calling hook for modification of initialized content
if ($hookObj = $this->hookRequest('initialize_postProc')) { if ($hookObj = $this->hookRequest('initialize_postProc')) {
$hookObj->initialize_postProc(); $hookObj->initialize_postProc();
......
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