foreach ($responses as $response) {
$commentIDs[] = $response->commentID;
- $userIDs[] = $response->userID;
+ if ($response->userID) {
+ $userIDs[] = $response->userID;
+ }
}
}
$users = array();
foreach ($comments as $comment) {
$userIDs[] = $comment->objectID;
- $userIDs[] = $comment->userID;
+ if ($comment->userID) {
+ $userIDs[] = $comment->userID;
+ }
}
if (!empty($userIDs)) {
$userList = new UserProfileList();
if (isset($users[$comment->objectID]) && !$users[$comment->objectID]->isProtected()) {
$like->setIsAccessible();
-
+
// short output
$text = WCF::getLanguage()->getDynamicVariable('wcf.like.title.com.woltlab.wcf.user.profileComment.response', array(
'responseAuthor' => $comment->userID ? $users[$response->userID] : null,
'like' => $like
));
$like->setTitle($text);
-
+
// output
$like->setDescription($response->getExcerpt());
}