From: Fabii547 Date: Sat, 14 May 2016 09:18:05 +0000 (+0200) Subject: Remove unnecessary code X-Git-Tag: 3.0.0_Beta_1~1287^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a67bf8344d8d3ad23c97e9bf2320fcfe5c012728;p=GitHub%2FWoltLab%2FWCF.git Remove unnecessary code --- 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'; } /**