From: Matthias Schmidt Date: Mon, 21 Jul 2014 13:46:53 +0000 (+0200) Subject: Add missing stacked email notification for followers X-Git-Tag: 2.1.0_Alpha_1~548^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf2b88803a463ad438501a5b7347d458bd399e0c;p=GitHub%2FWoltLab%2FWCF.git Add missing stacked email notification for followers --- diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.class.php index 8421991168..1e7f6ea089 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.class.php @@ -53,6 +53,19 @@ class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationE * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage() */ public function getEmailMessage($notificationType = 'instant') { + $authors = array_values($this->getAuthors()); + $count = count($authors); + + if ($count > 1) { + return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail.stacked', array( + 'author' => $this->author, + 'authors' => $authors, + 'count' => $count, + 'others' => $count - 1, + 'notificationType' => $notificationType + )); + } + return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail', array('author' => $this->author)); } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 700865cbdb..6391e915dd 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2911,6 +2911,7 @@ Sollten Sie sich nicht auf der Website: {@PAGE_TITLE|language} angemeldet haben, username} folgt Ihnen.]]> + username}{if $count == 2} und {else}, {/if}{@$authors[1]->username}{if $count == 3} und {@$authors[2]->username}{/if}{else}{@$authors[0]->username} und {#$others} weiteren{/if} folgen Ihnen.]]> username}” follows you.]]> getAnchorTag()}{if $count == 2} and {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} and {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} and {#$others} others{/if} follow you.]]> username} follows you.]]> + username}{if $count == 2} and {else}, {/if}{@$authors[1]->username}{if $count == 3} and {@$authors[2]->username}{/if}{else}{@$authors[0]->username} and {#$others} others{/if} follow you.]]>