diff --git a/Classes/Controller/LatestController.php b/Classes/Controller/LatestController.php index bca9fa889f123eee4517e583c31963d27e6dcb4a..393c956362a98045addca3de04b42f4d7db69029 100644 --- a/Classes/Controller/LatestController.php +++ b/Classes/Controller/LatestController.php @@ -103,18 +103,6 @@ class LatestController extends AbstractController { } } - // Redo this function, until $newsMetaData gets the $limit. Needed because of languagevisibility. - if (count($newsMetaData) < $limit) { - $offset += $limit; - $maxCount = $this->newsRepository->getCountOfLastUpdatedOrHighlightedNewsByCategories( - FALSE, $categoryUids, TRUE, $sortBy, $tagUids, $startTime, $endTime - ); - if ($offset < $maxCount) { - $this->indexAction($newsMetaData, $offset); - return; - } - } - $this->view->assign('newsMetaData', $newsMetaData); } diff --git a/Classes/Domain/Repository/NewsRepository.php b/Classes/Domain/Repository/NewsRepository.php index 4b593d0ace634045ff4ba84678bcd9570d6a235d..7bf40bf35b5b468295d6c7b1c19d391b39681284 100644 --- a/Classes/Domain/Repository/NewsRepository.php +++ b/Classes/Domain/Repository/NewsRepository.php @@ -239,30 +239,6 @@ class NewsRepository extends AbstractRepository { )->execute(); } - /** - * Returns the count of all possible last news. - * - * @param bool $onlyHighlighted - * @param array $categoryIds NULL, if the category filter isn't applied, otherwise an array with the categories uid. - * @param bool $hideNeverHighlightedNews - * @param string $sortBy date or positionInTree - * @param array $tagIds NULL, if the tag filter isn't applied, otherwise an array with the tag uids. - * @param int $startTime unix timestamp of the lower limit of the news results date - * @param int $endTime unix timestamp of the upper limit of the news results date - * @return int - * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException - */ - public function getCountOfLastUpdatedOrHighlightedNewsByCategories( - $onlyHighlighted = FALSE, array $categoryIds = NULL, $hideNeverHighlightedNews = FALSE, $sortBy = 'date', - array $tagIds = NULL, $startTime = 0, $endTime = 0 - ): int { - return $this->getCount( - $this->getQueryForLastUpdatedOrHighlightedNewsByCategories( - 0, $onlyHighlighted, $categoryIds, 0, $hideNeverHighlightedNews, $sortBy, $tagIds, $startTime, $endTime - ) - ); - } - /** * Returns the query object of the LastUpdatedOrHighlightedNewsByCategories. *