diff --git a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php index 8c645828b..ff7adf818 100644 --- a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php +++ b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php @@ -34,8 +34,8 @@ class NewsItemHistoryController extends AbstractController public function listAction(Request $request): Response { $filter = $this->buildFilterOrder(false); - $total = $this->newsItemRepository->countAllFilteredByUser($filter->getQueryString()); - $newsItems = $this->newsItemRepository->findAllFilteredByUser($filter->getQueryString()); + $total = $this->newsItemRepository->countAllFilteredBySearchTerm($filter->getQueryString()); + $newsItems = $this->newsItemRepository->findAllFilteredBySearchTerm($filter->getQueryString()); $pagination = $this->paginatorFactory->create($total); diff --git a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php index 88b597647..44e1f2d39 100644 --- a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php @@ -71,7 +71,7 @@ class NewsItemRepository implements ObjectRepository return $qb; } - public function findAllFilteredByUser(string $pattern = null) + public function findAllFilteredBySearchTerm(string $pattern = null) { $qb = $this->buildBaseQuery($pattern); $qb->addOrderBy('n.startDate', 'DESC') @@ -97,7 +97,7 @@ class NewsItemRepository implements ObjectRepository ->getResult(); } - public function countAllFilteredByUser(string $pattern = null) + public function countAllFilteredBySearchTerm(string $pattern = null) { $qb = $this->buildBaseQuery($pattern);