}
// update search index
- SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser);
+ SearchIndexManager::getInstance()->set(
+ 'com.woltlab.wcf.article',
+ $articleContent->articleContentID,
+ $articleContent->content,
+ $articleContent->title,
+ $article->time,
+ $article->userID,
+ $article->username,
+ $languageID ?: null,
+ $articleContent->teaser
+ );
// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
}
// update search index
- SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser);
+ SearchIndexManager::getInstance()->set(
+ 'com.woltlab.wcf.article',
+ $articleContent->articleContentID,
+ $articleContent->content,
+ $articleContent->title,
+ $article->time,
+ $article->userID,
+ $article->username,
+ $languageID ?: null,
+ $articleContent->teaser
+ );
// save embedded objects
if (!empty($content['htmlInputProcessor'])) {
/* @todo
if ($this->getDecoratedObject()->userID != WCF::getUser()->userID) {
$notificationObject = new LikeUserNotificationObject($like);
- UserNotificationHandler::getInstance()->fireEvent('like', 'com.woltlab.wcf.likeableArticle.notification', $notificationObject, [$this->getDecoratedObject()->userID], [
- 'objectID' => $this->getDecoratedObject()->articleID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'like',
+ 'com.woltlab.wcf.likeableArticle.notification',
+ $notificationObject,
+ [$this->getDecoratedObject()->userID],
+ ['objectID' => $this->getDecoratedObject()->articleID]
+ );
}
*/
}
$recipientIDs = array_diff($recipientIDs, [WCF::getUser()->userID]);
if (!empty($recipientIDs)) {
- UserNotificationHandler::getInstance()->fireEvent('comment', $objectType->objectType . '.notification', $notificationObject, $recipientIDs);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'comment',
+ $objectType->objectType . '.notification',
+ $notificationObject,
+ $recipientIDs
+ );
}
}
else {
$userID = $notificationObjectType->getOwnerID($this->createdComment->commentID);
if ($userID != WCF::getUser()->userID) {
- UserNotificationHandler::getInstance()->fireEvent('comment', $objectType->objectType . '.notification', $notificationObject, [$userID], [
- 'objectUserID' => $userID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'comment',
+ $objectType->objectType . '.notification',
+ $notificationObject,
+ [$userID],
+ ['objectUserID' => $userID]
+ );
}
}
}
$recipientIDs = array_diff($recipientIDs, [WCF::getUser()->userID]);
if (!empty($recipientIDs)) {
- UserNotificationHandler::getInstance()->fireEvent('commentResponse', $objectType->objectType.'.response.notification', $notificationObject, $recipientIDs, [
- 'commentID' => $this->comment->commentID,
- 'objectID' => $this->comment->objectID,
- 'userID' => $this->comment->userID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'commentResponse',
+ $objectType->objectType . '.response.notification',
+ $notificationObject,
+ $recipientIDs,
+ [
+ 'commentID' => $this->comment->commentID,
+ 'objectID' => $this->comment->objectID,
+ 'userID' => $this->comment->userID
+ ]
+ );
}
}
else {
$userID = $notificationObjectType->getOwnerID($this->comment->commentID);
if ($this->comment->userID != WCF::getUser()->userID) {
- UserNotificationHandler::getInstance()->fireEvent('commentResponse', $objectType->objectType.'.response.notification', $notificationObject, [$this->comment->userID], [
- 'commentID' => $this->comment->commentID,
- 'objectID' => $this->comment->objectID,
- 'objectUserID' => $userID,
- 'userID' => $this->comment->userID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'commentResponse',
+ $objectType->objectType . '.response.notification',
+ $notificationObject,
+ [$this->comment->userID],
+ [
+ 'commentID' => $this->comment->commentID,
+ 'objectID' => $this->comment->objectID,
+ 'objectUserID' => $userID,
+ 'userID' => $this->comment->userID
+ ]
+ );
}
// notify the container owner
if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.notification')) {
if ($userID != $this->comment->userID && $userID != WCF::getUser()->userID) {
- UserNotificationHandler::getInstance()->fireEvent('commentResponseOwner', $objectType->objectType . '.response.notification', $notificationObject, [$userID], [
- 'commentID' => $this->comment->commentID,
- 'objectID' => $this->comment->objectID,
- 'objectUserID' => $userID,
- 'userID' => $this->comment->userID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'commentResponseOwner',
+ $objectType->objectType . '.response.notification',
+ $notificationObject,
+ [$userID], [
+ 'commentID' => $this->comment->commentID,
+ 'objectID' => $this->comment->objectID,
+ 'objectUserID' => $userID,
+ 'userID' => $this->comment->userID
+ ]
+ );
}
}
}
if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.like.notification')) {
if ($this->userID != WCF::getUser()->userID) {
$notificationObject = new LikeUserNotificationObject($like);
- UserNotificationHandler::getInstance()->fireEvent('like', $objectType->objectType.'.like.notification', $notificationObject, [$this->userID], [
- 'objectID' => $this->getDecoratedObject()->objectID,
- 'objectOwnerID' => $this->userID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'like',
+ $objectType->objectType . '.like.notification',
+ $notificationObject,
+ [$this->userID],
+ [
+ 'objectID' => $this->getDecoratedObject()->objectID,
+ 'objectOwnerID' => $this->userID
+ ]
+ );
}
}
}
if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.response.like.notification')) {
if ($this->userID != WCF::getUser()->userID) {
$notificationObject = new LikeUserNotificationObject($like);
- UserNotificationHandler::getInstance()->fireEvent('like', $objectType->objectType.'.response.like.notification', $notificationObject, [$this->userID], [
- 'commentID' => $comment->commentID,
- 'commentUserID' => $comment->userID,
- 'objectID' => $comment->objectID
- ]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'like',
+ $objectType->objectType . '.response.like.notification',
+ $notificationObject,
+ [$this->userID],
+ [
+ 'commentID' => $comment->commentID,
+ 'commentUserID' => $comment->userID,
+ 'objectID' => $comment->objectID
+ ]
+ );
}
}
}
]);
// send notification
- UserNotificationHandler::getInstance()->fireEvent('following', 'com.woltlab.wcf.user.follow', new UserFollowUserNotificationObject($follow), [$follow->followUserID]);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'following',
+ 'com.woltlab.wcf.user.follow',
+ new UserFollowUserNotificationObject($follow),
+ [$follow->followUserID]
+ );
// fire activity event
UserActivityEventHandler::getInstance()->fireEvent('com.woltlab.wcf.user.recentActivityEvent.follow', $this->parameters['data']['userID']);
if (!empty($recipientIDs)) {
// create notifications
- UserNotificationHandler::getInstance()->fireEvent($notificationEventName, $notificationObjectType, $notificationObject, $recipientIDs, $additionalData);
+ UserNotificationHandler::getInstance()->fireEvent(
+ $notificationEventName,
+ $notificationObjectType,
+ $notificationObject,
+ $recipientIDs,
+ $additionalData
+ );
}
}
}
$comments[$articleContent->articleID] += $row['comments'] + $row['responses'];
// update search index
- SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $articles[$articleContent->articleID]->time, $articles[$articleContent->articleID]->userID, $articles[$articleContent->articleID]->username, $articleContent->languageID, $articleContent->teaser);
+ SearchIndexManager::getInstance()->set(
+ 'com.woltlab.wcf.article',
+ $articleContent->articleContentID,
+ $articleContent->content,
+ $articleContent->title,
+ $articles[$articleContent->articleID]->time,
+ $articles[$articleContent->articleID]->userID,
+ $articles[$articleContent->articleID]->username,
+ $articleContent->languageID,
+ $articleContent->teaser
+ );
}
// fetch cumulative likes