Skip to content

Commit 80782f1

Browse files
authored
Merge pull request #231 from dotkernel/issue-227
Remove 410 categories from sitemap
2 parents b13fd6c + de2ee3f commit 80782f1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/Blog/src/Repository/CategoryRepository.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public function getCategoriesWithPublishedPosts(): array
4242
->from(Category::class, 'categories');
4343

4444
$qb->where($qb->expr()->in('categories.id', $publishedCategoryIds->getDQL()))
45-
->setParameter('published', PostStatusEnum::Published);
45+
->andWhere('categories.isVisible = :visible')
46+
->setParameter('published', PostStatusEnum::Published)
47+
->setParameter('visible', true);
4648

4749
return $qb->getQuery()->getResult();
4850
}

0 commit comments

Comments
 (0)