Skip to content
Snippets Groups Projects
Commit 568f653a authored by Tim Wagner's avatar Tim Wagner
Browse files

[BUGFIX] Filtered News Overview discards all translated categories

parent 467388a9
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,15 @@ class OverviewController extends AbstractController {
$categoryRestrictions = GeneralUtility::intExplode(',', $this->settings['categoryRestrictions'], TRUE);
if (count($categoryRestrictions) > 0) {
foreach ($categories as $key => $category) {
if (!in_array($category->getUid(), $categoryRestrictions, TRUE)) {
$categoryId = $category->getUid();
if ($category->_getProperty('_languageUid') > 0) {
$originalLangCategory = $this->categoryRepository->findOriginalLanguageById($category->getUid());
if ($originalLangCategory) {
$categoryId = $originalLangCategory->getUid();
}
}
if (!in_array($categoryId, $categoryRestrictions, TRUE)) {
unset($categories[$key]);
}
}
......
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