From: Matthias Schmidt Date: Sun, 27 Jul 2014 09:12:06 +0000 (+0200) Subject: Fix link of non-stacked wall comment (response) like links X-Git-Tag: 2.1.0_Alpha_1~531 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a17d5abbc9e5ba6881d2e8d7d06f1635b01a56b;p=GitHub%2FWoltLab%2FWCF.git Fix link of non-stacked wall comment (response) like links --- diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php index 0f2c50abc2..3808a786b8 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php @@ -80,7 +80,14 @@ class UserProfileCommentLikeUserNotificationEvent extends AbstractSharedUserNoti * @see \wcf\system\user\notification\event\IUserNotificationEvent::getLink() */ public function getLink() { - return LinkHandler::getInstance()->getLink('User', array('object' => WCF::getUser()), '#wall'); + $owner = WCF::getUser(); + if ($this->additionalData['objectID'] != WCF::getUser()->userID) { + $owner = CommentDataHandler::getInstance()->getUser($this->additionalData['objectID']); + } + + return LinkHandler::getInstance()->getLink('User', array( + 'object' => $owner + ), '#wall'); } /** diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php index 210ae34b26..3a02b267b3 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php @@ -84,7 +84,14 @@ class UserProfileCommentResponseLikeUserNotificationEvent extends AbstractShared * @see \wcf\system\user\notification\event\IUserNotificationEvent::getLink() */ public function getLink() { - return LinkHandler::getInstance()->getLink('User', array('object' => WCF::getUser()), '#wall'); + $owner = WCF::getUser(); + if ($this->additionalData['objectID'] != WCF::getUser()->userID) { + $owner = CommentDataHandler::getInstance()->getUser($this->additionalData['objectID']); + } + + return LinkHandler::getInstance()->getLink('User', array( + 'object' => $owner + ), '#wall'); } /**