* @inheritDoc
*/
public function delete() {
- $usersToArticles = $articleIDs = $articleContentIDs = [];
+ $articleIDs = $articleContentIDs = [];
foreach ($this->getObjects() as $article) {
$articleIDs[] = $article->articleID;
foreach ($article->getArticleContents() as $articleContent) {
$articleContentIDs[] = $articleContent->articleContentID;
}
-
- if ($article->publicationStatus == Article::PUBLISHED) {
- if (!isset($usersToArticles[$article->userID])) {
- $usersToArticles[$article->userID] = 0;
- }
- $usersToArticles[$article->userID]--;
- }
}
// delete articles
SearchIndexManager::getInstance()->delete('com.woltlab.wcf.article', $articleContentIDs);
// delete embedded object references
MessageEmbeddedObjectManager::getInstance()->removeObjects('com.woltlab.wcf.article.content', $articleContentIDs);
- // update wcf1_user.articles
- ArticleEditor::updateArticleCounter($usersToArticles);
}
$this->unmarkItems();