namespace wcf\system\user\activity\event;
use wcf\data\article\ViewableArticleList;
-use wcf\data\comment\CommentList;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// fetch articles
$articleContentIDs = [];
namespace wcf\system\user\activity\event;
-use wcf\data\comment\CommentList;
use wcf\data\page\PageCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// set message
foreach ($events as $event) {
namespace wcf\system\user\activity\event;
-use wcf\data\comment\CommentList;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
}
// fetch comments
- $commentList = new CommentList();
- $commentList->setObjectIDs($commentIDs);
- $commentList->readObjects();
- $comments = $commentList->getObjects();
+ $comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
// fetch users
$userIDs = $users = [];
use wcf\data\comment\response\CommentResponse;
use wcf\data\user\activity\event\ViewableUserActivityEvent;
use wcf\data\user\UserProfile;
-use wcf\system\cache\runtime\CommentResponseRuntimeCache;
-use wcf\system\cache\runtime\CommentRuntimeCache;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentResponseRuntimeCache;
+use wcf\system\cache\runtime\ViewableCommentRuntimeCache;
/**
* Provides a method to read the comment response, comment, and user objects related to comment
$responseIDs[] = $event->objectID;
}
- $this->responses = CommentResponseRuntimeCache::getInstance()->getObjects($responseIDs);
+ $this->responses = ViewableCommentResponseRuntimeCache::getInstance()->getObjects($responseIDs);
$commentIDs = [];
foreach ($this->responses as $response) {
}
if (!empty($commentIDs)) {
- $this->comments = CommentRuntimeCache::getInstance()->getObjects($commentIDs);
+ $this->comments = ViewableCommentRuntimeCache::getInstance()->getObjects($commentIDs);
}
$userIDs = [];