'likeValue' => $likeValue
));
- if ($likeValue == Like::DISLIKE) UserActivityPointHandler::getInstance()->removeEvents('com.woltlab.wcf.like.activityPointEvent.receivedLikes', array($user->userID => 1));
+ if ($likeable->getUserID()) {
+ if ($likeValue == Like::DISLIKE) UserActivityPointHandler::getInstance()->removeEvents('com.woltlab.wcf.like.activityPointEvent.receivedLikes', array($likeable->getUserID() => 1));
+ else UserActivityPointHandler::getInstance()->fireEvent('com.woltlab.wcf.like.activityPointEvent.receivedLikes', $like->likeID, $likeable->getUserID());
+ }
}
// update object's like counter
*
* @param \wcf\data\like\Like $like
* @param \wcf\data\like\object\ILikeObject $likeable
- * @param \wcf\data\like\object\LikeObject $likeObject
+ * @param \wcf\data\like\object\LikeObject $likeObject
* @param \wcf\data\user\User $user
* @return array
*/
$userEditor->updateCounters(array(
'likesReceived' => -1
));
+
+ UserActivityPointHandler::getInstance()->removeEvents('com.woltlab.wcf.like.activityPointEvent.receivedLikes', array($likeable->getUserID() => 1));
}
-
- UserActivityPointHandler::getInstance()->removeEvents('com.woltlab.wcf.like.activityPointEvent.receivedLikes', array($likeable->getUserID() => 1));
}
// update object's like counter