From a67bf8344d8d3ad23c97e9bf2320fcfe5c012728 Mon Sep 17 00:00:00 2001 From: Fabii547 Date: Sat, 14 May 2016 11:18:05 +0200 Subject: [PATCH] Remove unnecessary code --- ...mmentResponseUserNotificationEvent.class.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php index 1a60438544..1fe400143b 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php @@ -1,11 +1,9 @@ cacheObjectID($this->userNotificationObject->commentID); UserProfileRuntimeCache::getInstance()->cacheObjectID($this->additionalData['objectID']); - UserProfileRuntimeCache::getInstance()->cacheObjectID($this->additionalData['userID']); } /** @@ -48,8 +44,7 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser * @inheritDoc */ public function getMessage() { - $comment = CommentRuntimeCache::getInstance()->getObject($this->userNotificationObject->commentID); - $owner = UserProfileRuntimeCache::getInstance()->getObject($comment->objectID); + $owner = UserProfileRuntimeCache::getInstance()->getObject($this->additionalData['objectID']); $authors = $this->getAuthors(); if (count($authors) > 1) { @@ -77,8 +72,7 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser * @inheritDoc */ public function getEmailMessage($notificationType = 'instant') { - $comment = CommentRuntimeCache::getInstance()->getObject($this->userNotificationObject->commentID); - $owner = UserProfileRuntimeCache::getInstance()->getObject($comment->objectID); + $owner = UserProfileRuntimeCache::getInstance()->getObject($this->additionalData['objectID']); $authors = $this->getAuthors(); if (count($authors) > 1) { @@ -111,10 +105,7 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser * @inheritDoc */ public function getLink() { - $comment = CommentRuntimeCache::getInstance()->getObject($this->userNotificationObject->commentID); - $user = UserProfileRuntimeCache::getInstance()->getObject($comment->objectID); - - return LinkHandler::getInstance()->getLink('User', ['object' => $user], '#wall'); + return UserProfileRuntimeCache::getInstance()->getObject($this->additionalData['objectID'])->getLink() . '#wall'; } /** -- 2.20.1