Use runtime cache for article content
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 25 Mar 2024 10:07:00 +0000 (11:07 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 25 Mar 2024 10:07:00 +0000 (11:07 +0100)
wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php

index 834e6caea5cc19692a3868a12d7aa8536ec07ce4..e900765a4c7f25753794ec9a0c8b8c765ec7507f 100644 (file)
@@ -75,7 +75,7 @@ class ArticleCommentManager extends AbstractCommentManager implements IViewableL
     #[\Override]
     public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool
     {
-        $articleContent = new ArticleContent($objectID);
+        $articleContent = ViewableArticleContentRuntimeCache::getInstance()->getObject($objectID);
         if (!$articleContent->articleContentID) {
             return false;
         }