From 6666002c19e00a4b87df6d72173563740670991a Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 27 Apr 2023 16:08:39 +0200 Subject: [PATCH] Fix missing caching of article in notifications about comment responses --- ...mmentResponseOwnerUserNotificationEvent.class.php | 10 ++++++++++ ...cleCommentResponseUserNotificationEvent.class.php | 12 ++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseOwnerUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseOwnerUserNotificationEvent.class.php index d4e42842cf..42b148990b 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseOwnerUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseOwnerUserNotificationEvent.class.php @@ -22,6 +22,16 @@ class ArticleCommentResponseOwnerUserNotificationEvent extends AbstractCommentRe use TTestableCommentResponseUserNotificationEvent; use TTestableArticleCommentUserNotificationEvent; + /** + * @inheritDoc + */ + protected function prepare() + { + parent::prepare(); + + ViewableArticleContentRuntimeCache::getInstance()->cacheObjectID($this->additionalData['objectID']); + } + /** * @inheritDoc */ diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseUserNotificationEvent.class.php index c2df7ac315..532fc7e637 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ArticleCommentResponseUserNotificationEvent.class.php @@ -2,10 +2,8 @@ namespace wcf\system\user\notification\event; -use wcf\system\cache\runtime\CommentRuntimeCache; use wcf\system\cache\runtime\ViewableArticleContentRuntimeCache; use wcf\system\email\Email; -use wcf\system\user\notification\object\CommentResponseUserNotificationObject; /** * User notification event for article comment responses. @@ -21,6 +19,16 @@ class ArticleCommentResponseUserNotificationEvent extends AbstractCommentRespons use TTestableCommentResponseUserNotificationEvent; use TTestableArticleCommentUserNotificationEvent; + /** + * @inheritDoc + */ + protected function prepare() + { + parent::prepare(); + + ViewableArticleContentRuntimeCache::getInstance()->cacheObjectID($this->additionalData['objectID']); + } + /** * @inheritDoc */ -- 2.20.1