From: Marcel Werk Date: Tue, 20 Sep 2016 15:43:41 +0000 (+0200) Subject: Use ArticleAction instead ArticleEditor for article publication X-Git-Tag: 3.0.0_Beta_1~66 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=892687f0ebb927405f59eea4e9d305fe1262ca5d;p=GitHub%2FWoltLab%2FWCF.git Use ArticleAction instead ArticleEditor for article publication --- diff --git a/wcfsetup/install/files/lib/system/cronjob/ArticlePublicationCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/ArticlePublicationCronjob.class.php index 38bc0889b9..4d70c0bbf5 100644 --- a/wcfsetup/install/files/lib/system/cronjob/ArticlePublicationCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/ArticlePublicationCronjob.class.php @@ -1,6 +1,7 @@ decoratorClassName = ArticleEditor::class; $articleList->readObjects(); - foreach ($articleList as $editor) { - /** @var ArticleEditor $editor */ - $editor->update([ - 'time' => $editor->publicationDate, - 'publicationStatus' => Article::PUBLISHED, - 'publicationDate' => 0 + foreach ($articleList as $article) { + $action = new ArticleAction(array($article), 'update', [ + 'data' => [ + 'time' => $article->publicationDate, + 'publicationStatus' => Article::PUBLISHED, + 'publicationDate' => 0 + ] ]); + $action->executeAction(); } } }