Permalink
Browse files

Remove article if there are no categories related

Bug fix
Fixes #4
  • Loading branch information...
1 parent c84a1be commit 2cd8cb3505e5d8a142d58d676a5ef976d98af552 @iambrosi iambrosi committed Dec 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ServerGrove/KbBundle/Controller/Admin/CategoriesController.php
@@ -285,7 +285,7 @@ public function removeArticlesFromCategory()
/** @var $article Article */
foreach ($category->getArticles() as $article) {
$article->removeCategory($category);
- if (1 == $article->getCategories()->count()) {
+ if (0 == $article->getCategories()->count()) {
$logger->info(sprintf('Removing article "%s"', $article->getTitle()));
$dm->remove($article);
}

0 comments on commit 2cd8cb3

Please sign in to comment.