Exclude deleted articles from automatic publication
authorAlexander Ebert <ebert@woltlab.com>
Tue, 21 Mar 2017 12:20:39 +0000 (13:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 21 Mar 2017 12:20:39 +0000 (13:20 +0100)
See #2209

wcfsetup/install/files/lib/system/cronjob/ArticlePublicationCronjob.class.php

index a7684cc0fd08633026ff13410702114773b72b6a..e188b67063e3610d9dc8186f3eee31ebc586b858 100644 (file)
@@ -26,6 +26,7 @@ class ArticlePublicationCronjob extends AbstractCronjob {
                $articleList->getConditionBuilder()->add('article.publicationStatus = ?', [Article::DELAYED_PUBLICATION]);
                $articleList->getConditionBuilder()->add('article.publicationDate > ?', [0]);
                $articleList->getConditionBuilder()->add('article.publicationDate <= ?', [TIME_NOW]);
+               $articleList->getConditionBuilder()->add('article.isDeleted = ?', [0]);
                $articleList->decoratorClassName = ArticleEditor::class;
                $articleList->readObjects();