Skip to content
Snippets Groups Projects
Commit 853bf1cd authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASk] Revert changes to ListByCategoryController

parent cad6a6c9
No related branches found
Tags 3.5.1
1 merge request!5Feature 5 2 0
......@@ -56,12 +56,11 @@ class ListByCategoryController extends AbstractController {
* Renders the news list of a category
*
* @param array $newsMetaData
* @param array $newsFilter
* @return void
* @throws \InvalidArgumentException
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException
*/
public function indexAction(array $newsMetaData = [], array $newsFilter = []) {
public function indexAction(array $newsMetaData = []) {
$filterByCategories = FALSE;
$categoryUids = GeneralUtility::intExplode(',', $this->settings['categories']);
$tagUids = GeneralUtility::intExplode(',', $this->settings['tags'], TRUE);
......@@ -72,19 +71,10 @@ class ListByCategoryController extends AbstractController {
}
}
// remember selection of the filter values
$selectedTag = $this->tagRepository->findByUid((int) $newsFilter['tag']);
$selectedCategory = $this->categoryRepository->findByUid((int) $newsFilter['category']);
$this->view->assign('selectedTag', $selectedTag);
$this->view->assign('selectedCategory', $selectedCategory);
if (!$filterByCategories) {
$categoryUids = [(int) $GLOBALS['TSFE']->id];
}
$tags = $this->tagRepository->findAll()->toArray();
$this->view->assign('tags', $tags);
$categories = [];
foreach ($categoryUids as $categoryUid) {
$categories[$categoryUid] = $this->categoryRepository->findByUid($categoryUid);
......@@ -127,7 +117,7 @@ class ListByCategoryController extends AbstractController {
$nextPage = $currentPageBrowserPage + 1;
if ($nextPage <= $numberOfPages) {
GeneralUtility::_GETset(['tx_sgnews_pagebrowser' => ['currentPage' => $nextPage]]);
$this->indexAction($newsMetaData, $newsFilter);
$this->indexAction($newsMetaData);
return;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment