use wcf\data\like\ILikeObjectTypeProvider;
use wcf\data\like\object\ILikeObject;
use wcf\data\object\type\AbstractObjectTypeProvider;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\comment\CommentHandler;
use wcf\system\like\IViewableLikeProvider;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// group likes by object type id
$likeData = [];
use wcf\data\article\ArticleEditor;
use wcf\data\article\content\ArticleContent;
use wcf\data\article\content\ArticleContentList;
-use wcf\data\comment\CommentList;
-use wcf\data\comment\response\CommentResponseList;
use wcf\data\object\type\ObjectTypeCache;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\cache\runtime\ViewableArticleContentRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentResponseRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\like\IViewableLikeProvider;
use wcf\system\WCF;
// fetch response
$userIDs = $responses = [];
if (!empty($responseIDs)) {
- $responseList = new CommentResponseList();
- $responseList->setObjectIDs($responseIDs);
- $responseList->readObjects();
- $responses = $responseList->getObjects();
+ $responses = ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs);
foreach ($responses as $response) {
$commentIDs[] = $response->commentID;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// fetch users
$users = [];
namespace wcf\system\comment\manager;
-use wcf\data\comment\CommentList;
-use wcf\data\comment\response\CommentResponseList;
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\page\Page;
use wcf\data\page\PageList;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentResponseRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\like\IViewableLikeProvider;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
// fetch response
$userIDs = $responses = [];
if (!empty($responseIDs)) {
- $responseList = new CommentResponseList();
- $responseList->setObjectIDs($responseIDs);
- $responseList->readObjects();
- $responses = $responseList->getObjects();
+ $responses = ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs);
foreach ($responses as $response) {
$commentIDs[] = $response->commentID;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// fetch users
$users = [];
namespace wcf\system\comment\manager;
use wcf\data\comment\Comment;
-use wcf\data\comment\CommentList;
use wcf\data\comment\response\CommentResponse;
-use wcf\data\comment\response\CommentResponseList;
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\user\ignore\UserIgnore;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentResponseRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\like\IViewableLikeProvider;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
// fetch response
$userIDs = $responses = [];
if (!empty($responseIDs)) {
- $responseList = new CommentResponseList();
- $responseList->setObjectIDs($responseIDs);
- $responseList->readObjects();
- $responses = $responseList->getObjects();
+ $responses = ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs);
foreach ($responses as $response) {
$commentIDs[] = $response->commentID;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// fetch users
$users = [];