From bf2b88803a463ad438501a5b7347d458bd399e0c Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 21 Jul 2014 15:46:53 +0200 Subject: [PATCH] Add missing stacked email notification for followers --- ...erFollowFollowingUserNotificationEvent.class.php | 13 +++++++++++++ wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 3 files changed, 15 insertions(+) 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.]]> -- 2.20.1