From: Marcel Werk Date: Thu, 27 Apr 2023 14:08:39 +0000 (+0200) Subject: Fix missing caching of article in notifications about comment responses X-Git-Tag: 6.0.0_Alpha_1~188 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6666002c19e00a4b87df6d72173563740670991a;p=GitHub%2FWoltLab%2FWCF.git Fix missing caching of article in notifications about comment responses --- 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 */