Also load articles that are not accessible
authorMarcel Werk <burntime@woltlab.com>
Mon, 22 Jan 2024 15:10:10 +0000 (16:10 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 22 Jan 2024 15:10:10 +0000 (16:10 +0100)
Otherwise it would not be possible to determine in the BBCode whether an article exists or is not accessible.

wcfsetup/install/files/lib/system/message/embedded/object/ArticleMessageEmbeddedObjectHandler.class.php

index 10b7162ca53fd09410413a8374c79db1c0efa7be..5757ad647fd1a205f08ad9e0f80cd6fc1414aa17 100644 (file)
@@ -5,7 +5,7 @@ namespace wcf\system\message\embedded\object;
 use wcf\data\article\AccessibleArticleList;
 use wcf\data\article\Article;
 use wcf\data\article\content\ViewableArticleContentList;
-use wcf\system\cache\runtime\ViewableArticleRuntimeCache;
+use wcf\data\article\ViewableArticleList;
 use wcf\system\html\input\HtmlInputProcessor;
 
 /**
@@ -38,7 +38,7 @@ class ArticleMessageEmbeddedObjectHandler extends AbstractSimpleMessageEmbeddedO
     public function loadObjects(array $objectIDs)
     {
         // Do not use `ViewableArticleRuntimeCache` to avoid recursively loading embedded objects.
-        $articleList = new AccessibleArticleList();
+        $articleList = new ViewableArticleList();
         $articleList->enableEmbeddedObjectLoading(false);
         $articleList->getConditionBuilder()->add('article.articleID IN (?)', [$objectIDs]);
         $articleList->readObjects();