diff --git a/Classes/Controller/AnalysisController.php b/Classes/Controller/AnalysisController.php index 52deff93..abd61163 100644 --- a/Classes/Controller/AnalysisController.php +++ b/Classes/Controller/AnalysisController.php @@ -414,11 +414,16 @@ public function detailLinkListenerAction(Linklistener $linkListener): ResponseIn */ public function detailSearchAction(string $searchterm): ResponseInterface { - $filter = ObjectUtility::getFilterDto()->setSearchterm($searchterm); + $filter = BackendUtility::getFilterFromSession( + 'search', + $this->getControllerName(), + ['searchterm' => $searchterm, 'limit' => 100] + ); $this->view->assignMultiple([ + 'filter' => $filter, 'searchterm' => $searchterm, 'searchData' => GeneralUtility::makeInstance(SearchDataProvider::class, $filter), - 'searches' => $this->searchRepository->findBySearchterm($filter), + 'searches' => $this->searchRepository->findByFilter($filter), ]); $this->addDocumentHeaderForCurrentController(); @@ -524,8 +529,9 @@ public function detailSearchAjaxPage(ServerRequestInterface $request): ResponseI ['searchterm' => urldecode($request->getQueryParams()['searchterm']), 'limit' => 10] ); $standaloneView->assignMultiple([ - 'searches' => $this->searchRepository->findBySearchterm($filter), + 'searches' => $this->searchRepository->findByFilter($filter), 'searchterm' => $request->getQueryParams()['searchterm'], + 'searchData' => GeneralUtility::makeInstance(SearchDataProvider::class, $filter), ]); $response = GeneralUtility::makeInstance(JsonResponse::class); /** @var StreamInterface $stream */ diff --git a/Classes/Domain/Repository/SearchRepository.php b/Classes/Domain/Repository/SearchRepository.php index 28f125fc..6f781594 100644 --- a/Classes/Domain/Repository/SearchRepository.php +++ b/Classes/Domain/Repository/SearchRepository.php @@ -46,7 +46,7 @@ public function findCombinedBySearchIdentifier(FilterDto $filter): array return $connection->executeQuery($sql)->fetchAllAssociative(); } - public function findBySearchterm(FilterDto $filter): QueryResultInterface + public function findByFilter(FilterDto $filter): QueryResultInterface { $sql = 'select s.* from ' . Search::TABLE_NAME . ' s' . ' left join ' . Pagevisit::TABLE_NAME . ' pv on s.pagevisit = pv.uid' diff --git a/Resources/Private/Partials/Box/Miscellaneous/FilterInformation.html b/Resources/Private/Partials/Box/Miscellaneous/FilterInformation.html index cbe96340..c209eeb6 100644 --- a/Resources/Private/Partials/Box/Miscellaneous/FilterInformation.html +++ b/Resources/Private/Partials/Box/Miscellaneous/FilterInformation.html @@ -102,3 +102,14 @@