Removed obsolete code
authorMarcel Werk <burntime@woltlab.com>
Sun, 4 Oct 2020 09:07:18 +0000 (11:07 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 4 Oct 2020 09:07:18 +0000 (11:07 +0200)
There is no article counter for users (wcf1_user.articles) in version 3.1.

wcfsetup/install/files/lib/data/article/ArticleAction.class.php

index cb39904700017bf0ef13a85981d13812aab5ddcb..0e60fa4a0762016617c87d1319cc87dafca8c2f2 100644 (file)
@@ -269,19 +269,12 @@ class ArticleAction extends AbstractDatabaseObjectAction {
         * @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
@@ -298,8 +291,6 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                        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();