Add missing stacked email notification for followers
authorMatthias Schmidt <gravatronics@live.com>
Mon, 21 Jul 2014 13:46:53 +0000 (15:46 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 21 Jul 2014 13:47:09 +0000 (15:47 +0200)
wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 8421991168bb6506e2c44646398eb2c2241d5063..1e7f6ea089a80b4f69604d863dc6fa014458a3bc 100644 (file)
@@ -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));
        }
        
index 700865cbdbdfe8059e056e383c4cfe7d04654e39..6391e915ddb8c890bec3f16b2972c2c8cba9d8d5 100644 (file)
@@ -2911,6 +2911,7 @@ Sollten Sie sich nicht auf der Website: {@PAGE_TITLE|language} angemeldet haben,
                <item name="wcf.user.notification.follow.title"><![CDATA[Neuer Follower]]></item>
                <item name="wcf.user.notification.follow.title.stacked"><![CDATA[{#$count} neue Follower]]></item>
                <item name="wcf.user.notification.follow.mail"><![CDATA[{@$author->username} folgt Ihnen.]]></item>
+               <item name="wcf.user.notification.follow.mail.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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.]]></item>
                <item name="wcf.user.notification.mail.disabled"><![CDATA[Die E-Mail-Benachrichtigung wurde erfolgreich abgeschaltet.]]></item>
                <item name="wcf.user.notification.mail.footer"><![CDATA[Diese E-Mail ist eine automatische Benachrichtigung. BITTE ANTWORTEN SIE NICHT AUF DIESE E-MAIL.
                
index 8d7303f5fef517173c6ab139a2ed51fb5ffb5ce8..5fe7734b5f5ec89206bd9735ccd143c6254f8bfd 100644 (file)
@@ -2769,6 +2769,7 @@ You can safely ignore this email if you did not register with the website: {@PAG
                <item name="wcf.user.notification.follow.message"><![CDATA[“{$author->username}” follows you.]]></item>
                <item name="wcf.user.notification.follow.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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.]]></item>
                <item name="wcf.user.notification.follow.mail"><![CDATA[{@$author->username} follows you.]]></item>
+               <item name="wcf.user.notification.follow.mail.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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.]]></item>
                <item name="wcf.user.notification.follow.title"><![CDATA[New Follower]]></item>
                <item name="wcf.user.notification.follow.title.stacked"><![CDATA[{#$count} new followers]]></item>
                <item name="wcf.user.notification.mail.disabled"><![CDATA[Email notification has been disabled.]]></item>