Fix missing reset of unread watched articles
authorJoshua Rüsweg <josh@bastelstu.be>
Wed, 29 Aug 2018 14:27:15 +0000 (16:27 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Wed, 29 Aug 2018 14:27:15 +0000 (16:27 +0200)
See #2642

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

index ac13137ff7e1528f926177b8845372ac3a4b29d2..4a86e8ac6883a82bf969919aec7477311251e83c 100644 (file)
@@ -256,6 +256,7 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                // reset storage
                if (ARTICLE_ENABLE_VISIT_TRACKING) {
                        UserStorageHandler::getInstance()->resetAll('unreadArticles');
+                       UserStorageHandler::getInstance()->resetAll('unreadWatchedArticles');
                }
                
                $publicationStatus = (isset($this->parameters['data']['publicationStatus'])) ? $this->parameters['data']['publicationStatus'] : null;
@@ -398,6 +399,7 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                // reset storage
                if (ARTICLE_ENABLE_VISIT_TRACKING) {
                        UserStorageHandler::getInstance()->resetAll('unreadArticles');
+                       UserStorageHandler::getInstance()->resetAll('unreadWatchedArticles');
                }
                
                return ['objectIDs' => $this->objectIDs];
@@ -425,6 +427,7 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                // reset storage
                if (ARTICLE_ENABLE_VISIT_TRACKING) {
                        UserStorageHandler::getInstance()->resetAll('unreadArticles');
+                       UserStorageHandler::getInstance()->resetAll('unreadWatchedArticles');
                }
                
                return ['objectIDs' => $this->objectIDs];
@@ -525,6 +528,7 @@ class ArticleAction extends AbstractDatabaseObjectAction {
                // reset storage
                if (WCF::getUser()->userID) {
                        UserStorageHandler::getInstance()->reset([WCF::getUser()->userID], 'unreadArticles');
+                       UserStorageHandler::getInstance()->reset([WCF::getUser()->userID], 'unreadWatchedArticles');
                }
        }