From: Alexander Ebert Date: Tue, 1 Jul 2014 23:57:14 +0000 (+0200) Subject: Some improvements and added missing phrases X-Git-Tag: 2.1.0_Alpha_1~637 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d1c7c3f1c9a95ed546d14a688d55f1f32c24510;p=GitHub%2FWoltLab%2FWCF.git Some improvements and added missing phrases --- 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 f728699458..04e1c6ce66 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 @@ -1,6 +1,5 @@ cacheUserID($this->additionalData['objectID']); + CommentDataHandler::getInstance()->cacheUserID($this->additionalData['commentUserID']); + } + /** * @see \wcf\system\user\notification\event\IUserNotificationEvent::getTitle() */ @@ -44,10 +51,10 @@ class UserProfileCommentResponseLikeUserNotificationEvent extends AbstractUserNo $count = count($authors); $commentUser = $owner = null; if ($this->additionalData['objectID'] != WCF::getUser()->userID) { - $owner = new User($this->additionalData['objectID']); + $owner = CommentDataHandler::getInstance()->getUser($this->additionalData['objectID']); } if ($this->additionalData['commentUserID'] != WCF::getUser()->userID) { - $commentUser = new User($this->additionalData['commentUserID']); + $commentUser = CommentDataHandler::getInstance()->getUser($this->additionalData['commentUserID']); } if ($count > 1) { diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php index bc1263cdfe..eb24bad634 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php @@ -27,6 +27,7 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractShare */ protected function prepare() { CommentDataHandler::getInstance()->cacheCommentID($this->userNotificationObject->commentID); + CommentDataHandler::getInstance()->cacheUserID($this->additionalData['userID']); } /** @@ -48,10 +49,9 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractShare * @see \wcf\system\user\notification\event\IUserNotificationEvent::getMessage() */ public function getMessage() { - // @todo: use cache or a single query to retrieve required data - $comment = new Comment($this->userNotificationObject->commentID); + $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID); if ($comment->userID) { - $commentAuthor = new User($comment->userID); + $commentAuthor = CommentDataHandler::getInstance()->getUser($comment->userID); } else { $commentAuthor = new User(null, array( 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 68b5eea6b4..03c5aad3e4 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 @@ -48,7 +48,6 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser * @see \wcf\system\user\notification\event\IUserNotificationEvent::getMessage() */ public function getMessage() { - // @todo: use cache or a single query to retrieve required data $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID); $owner = CommentDataHandler::getInstance()->getUser($comment->objectID); if ($comment->userID) { @@ -96,7 +95,6 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser * @see \wcf\system\user\notification\event\IUserNotificationEvent::getLink() */ public function getLink() { - // @todo: use cache or a single query to retrieve required data $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID); $user = CommentDataHandler::getInstance()->getUser($comment->objectID); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 79ebf56894..cdcb1ba1d0 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2924,7 +2924,7 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn username} verfasst.]]> - getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf Ihren Kommentar an der Pinnwand von {$owner->username} geantwortet.]]> + getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weitere{/if} haben auf Ihren Kommentar an {if $owner->userID == $__wcf->getUser()->userID}Ihrer Pinnwand{else}der Pinnwand von {$owner->username}{/if} geantwortet.]]> username}{/if}.]]> @@ -2948,6 +2948,8 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 8d8185cad7..33642a064a 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2784,7 +2784,7 @@ If you do not want to receive further email notifications for this event, you ca username}’s wall.]]> - getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$count} others{/if} replied to your comment on {$owner->username}’s wall.]]> + getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$count} others{/if} replied to your comment on {if $owner->userID == $__wcf->getUser()->userID}your{else}{$owner->username}’s{/if} wall.]]> username}’s wall{/if}.]]> @@ -2808,6 +2808,8 @@ If you do not want to receive further email notifications for this event, you ca + +