Fixed some issues will grouped notifications / cronjob
authorAlexander Ebert <ebert@woltlab.com>
Sat, 19 Jul 2014 10:36:43 +0000 (12:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 19 Jul 2014 10:36:43 +0000 (12:36 +0200)
wcfsetup/install/files/lib/data/user/notification/UserNotificationEditor.class.php
wcfsetup/install/files/lib/system/comment/CommentDataHandler.class.php
wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 52d53d509b5faa9032cc711720733e00ac1109ed..37715e65d3c215f71c3bcd1990d76cd5ed5e6ebe 100644 (file)
@@ -24,7 +24,8 @@ class UserNotificationEditor extends DatabaseObjectEditor {
         */
        public function markAsConfirmed() {
                $this->update(array(
-                       'confirmed' => 1
+                       'confirmed' => 1,
+                       'mailNotified' => 1
                ));
                
                // delete notification_to_user assignment (mimic legacy notification system)
index f787c3b28b425ecb193bebbfc667b664f8b31e84..eb1960bec1be8f85a04067e463ab7ca84a17a8ac 100644 (file)
@@ -63,11 +63,15 @@ class CommentDataHandler extends SingletonFactory {
         */
        public function getComment($commentID) {
                if (!empty($this->commentIDs)) {
-                       $commentList = new CommentList();
-                       $commentList->setObjectIDs($this->commentIDs);
-                       $commentList->readObjects();
-                       $this->comments = $commentList->getObjects();
-                       $this->commentIDs = array();
+                       $this->commentIDs = array_diff($this->commentIDs, array_keys($this->comments));
+                       
+                       if (!empty($this->commentIDs)) {
+                               $commentList = new CommentList();
+                               $commentList->setObjectIDs($this->commentIDs);
+                               $commentList->readObjects();
+                               $this->comments = $commentList->getObjects();
+                               $this->commentIDs = array();
+                       }
                }
                
                if (isset($this->comments[$commentID])) {
index 1c1ba5f8479e3d291646d8dcba69876a21970cd9..e7dca1ef3a1013a05f3a4936ab44a646745467c0 100644 (file)
@@ -2,7 +2,8 @@
 namespace wcf\system\cronjob;
 use wcf\data\cronjob\Cronjob;
 use wcf\data\user\notification\event\UserNotificationEventList;
-use wcf\data\user\notification\UserNotificationList;
+use wcf\data\user\notification\UserNotification;
+use wcf\data\user\User;
 use wcf\data\user\UserEditor;
 use wcf\data\user\UserList;
 use wcf\data\user\UserProfile;
@@ -31,14 +32,14 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                
                // get user ids
                $userIDs = array();
-               $sql = "SELECT  DISTINCT notification_to_user.userID
-                       FROM    wcf".WCF_N."_user_notification_to_user notification_to_user,
-                               wcf".WCF_N."_user_notification notification
-                       WHERE   notification.notificationID = notification_to_user.notificationID
-                               AND notification_to_user.mailNotified = 0
-                               AND notification.time < ".(TIME_NOW - 3600 * 23);
-               $statement = WCF::getDB()->prepareStatement($sql, 250);
-               $statement->execute();
+               $sql = "SELECT  DISTINCT userID
+                       FROM    wcf".WCF_N."_user_notification
+                       WHERE   mailNotified = 0
+                               AND time < ?";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute(array(
+                       TIME_NOW - 3600 * 23
+               ));
                while ($row = $statement->fetchArray()) {
                        $userIDs[] = $row['userID'];
                }
@@ -52,16 +53,11 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                
                // get notifications
                $conditions = new PreparedStatementConditionBuilder();
-               $conditions->add("notification.notificationID = notification_to_user.notificationID");
-               $conditions->add("notification_to_user.userID IN (?)", array($userIDs));
-               $conditions->add("notification_to_user.mailNotified = ?", array(0));
+               $conditions->add("notification.userID IN (?)", array($userIDs));
+               $conditions->add("notification.mailNotified = ?", array(0));
                
-               $sql = "SELECT          notification_to_user.notificationID, notification_event.eventID,
-                                       object_type.objectType, notification.objectID,
-                                       notification.additionalData, notification.authorID,
-                                       notification.time, notification_to_user.userID
-                       FROM            wcf".WCF_N."_user_notification_to_user notification_to_user,
-                                       wcf".WCF_N."_user_notification notification
+               $sql = "SELECT          notification.*, notification_event.eventID, object_type.objectType
+                       FROM            wcf".WCF_N."_user_notification notification
                        LEFT JOIN       wcf".WCF_N."_user_notification_event notification_event
                        ON              (notification_event.eventID = notification.eventID)
                        LEFT JOIN       wcf".WCF_N."_object_type object_type
@@ -75,36 +71,60 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                $conditions = new PreparedStatementConditionBuilder();
                $conditions->add("userID IN (?)", array($userIDs));
                $conditions->add("mailNotified = ?", array(0));
-               $sql = "UPDATE  wcf".WCF_N."_user_notification_to_user
+               $sql = "UPDATE  wcf".WCF_N."_user_notification
                        SET     mailNotified = 1
                        ".$conditions;
                $statement2 = WCF::getDB()->prepareStatement($sql);
                $statement2->execute($conditions->getParameters());
                
                // collect data
-               $authorIDs = $eventsToUser = $objectTypes = $eventIDs = $notificationIDs = array();
+               $eventsToUser = $objectTypes = $eventIDs = $notificationObjects = array();
                $availableObjectTypes = UserNotificationHandler::getInstance()->getAvailableObjectTypes();
                while ($row = $statement->fetchArray()) {
                        if (!isset($eventsToUser[$row['userID']])) $eventsToUser[$row['userID']] = array();
-                       $eventsToUser[$row['userID']][] = $row;
+                       $eventsToUser[$row['userID']][] = $row['notificationID'];
                        
                        // cache object types
                        if (!isset($objectTypes[$row['objectType']])) {
                                $objectTypes[$row['objectType']] = array(
-                                       'objectType' => $availableObjectTypes[$row['objectType']],
+                                       'objectType' => $this->availableObjectTypes[$row['objectType']],
                                        'objectIDs' => array(),
                                        'objects' => array()
                                );
                        }
-                       
+                               
                        $objectTypes[$row['objectType']]['objectIDs'][] = $row['objectID'];
                        $eventIDs[] = $row['eventID'];
-                       $notificationIDs[] = $row['notificationID'];
+                               
+                       $notificationObjects[$row['notificationID']] = new UserNotification(null, $row);
+               }
+               
+               // load authors
+               $conditions = new PreparedStatementConditionBuilder();
+               $conditions->add("notificationID IN (?)", array(array_keys($notificationObjects)));
+               $sql = "SELECT          notificationID, authorID
+                       FROM            wcf".WCF_N."_user_notification_author
+                       ".$conditions."
+                       ORDER BY        time ASC";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute($conditions->getParameters());
+               $authorIDs = $authorToNotification = array();
+               while ($row = $statement->fetchArray()) {
+                       if (!$row['authorID']) {
+                               continue;
+                       }
+                       
+                       if (!isset($authorToNotification[$row['notificationID']])) {
+                               $authorToNotification[$row['notificationID']] = array();
+                       }
+                       
                        $authorIDs[] = $row['authorID'];
+                       $authorToNotification[$row['notificationID']][] = $row['authorID'];
                }
                
                // load authors
                $authors = UserProfile::getUserProfiles($authorIDs);
+               $unknownAuthor = new UserProfile(new User(null, array('userID' => null, 'username' => WCF::getLanguage()->get('wcf.user.guest'))));
                
                // load objects associated with each object type
                foreach ($objectTypes as $objectType => $objectData) {
@@ -117,12 +137,6 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                $eventList->readObjects();
                $eventObjects = $eventList->getObjects();
                
-               // load notification objects
-               $notificationList = new UserNotificationList();
-               $notificationList->getConditionBuilder()->add("user_notification.notificationID IN (?)", array($notificationIDs));
-               $notificationList->readObjects();
-               $notificationObjects = $notificationList->getObjects();
-               
                foreach ($eventsToUser as $userID => $events) {
                        if (!isset($users[$userID])) continue;
                        $user = $users[$userID];
@@ -132,18 +146,32 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                                'user' => $user
                        ))."\n\n";
                        
-                       foreach ($events as $event) {
-                               $className = $eventObjects[$event['eventID']]->className;
-                               $class = new $className($eventObjects[$event['eventID']]);
+                       foreach ($events as $notificationID) {
+                               $notification = $notificationObjects[$notificationID];
                                
+                               $className = $eventObjects[$notification->eventID]->className;
+                               $class = new $className($eventObjects[$notification->eventID]);
                                $class->setObject(
-                                       $notificationObjects[$event['notificationID']],
-                                       $objectTypes[$event['objectType']]['objects'][$event['objectID']],
-                                       $authors[$event['authorID']],
-                                       unserialize($event['additionalData'])
+                                       $notification,
+                                       $objectTypes[$notification->objectType]['objects'][$notification->objectID],
+                                       (isset($authors[$notification->authorID]) ? $authors[$notification->authorID] : $unknownAuthor),
+                                       $notification->additionalData,
+                                       $notification->timesTriggered
                                );
                                $class->setLanguage($user->getLanguage());
                                
+                               if (isset($authorToNotification[$notification->notificationID])) {
+                                       $eventAuthors = array();
+                                       foreach ($authorToNotification[$notification->notificationID] as $userID) {
+                                               if (isset($authors[$userID])) {
+                                                       $eventAuthors[$userID] = $authors[$userID];
+                                               }
+                                       }
+                                       if (!empty($eventAuthors)) {
+                                               $class->setAuthors($eventAuthors);
+                                       }
+                               }
+                               
                                if ($message != '') $message .= "\n\n";
                                $message .= $class->getEmailMessage('daily');
                        }
index eb24bad634b0b48a63bee6b8ca98240fa893e9ae..8db5e47fe23c007ac47b3a4525ae856637f29c06 100644 (file)
@@ -80,7 +80,9 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractShare
         * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
        public function getEmailMessage($notificationType = 'instant') {
+               $authors = array_values($this->getAuthors());
                $comment = new Comment($this->userNotificationObject->commentID);
+               $count = count($authors);
                $owner = new User($comment->objectID);
                if ($comment->userID) {
                        $commentAuthor = new User($comment->userID);
@@ -91,6 +93,19 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractShare
                        ));
                }
                
+               if ($count > 1) {
+                       return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.mail', array(
+                               'author' => $this->author,
+                               'authors' => $authors,
+                               'commentAuthor' => $commentAuthor,
+                               'count' => $count,
+                               'notificationType' => $notificationType,
+                               'others' => $count - 1,
+                               'owner' => $owner,
+                               'response' => $this->userNotificationObject
+                       ));
+               }
+               
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponseOwner.mail', array(
                        'response' => $this->userNotificationObject,
                        'author' => $this->author,
index 03c5aad3e49b617921967550e0ea5b20c5725568..e25d587a32af399cafa8c2312d39fd0aa270e137 100644 (file)
@@ -50,14 +50,6 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser
        public function getMessage() {
                $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID);
                $owner = CommentDataHandler::getInstance()->getUser($comment->objectID);
-               if ($comment->userID) {
-                       $commentAuthor = CommentDataHandler::getInstance()->getUser($comment->userID);
-               }
-               else {
-                       $commentAuthor = new User(null, array(
-                               'username' => $comment->username
-                       ));
-               }
                
                $authors = array_values($this->getAuthors());
                $count = count($authors);
@@ -80,13 +72,27 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUser
         * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
        public function getEmailMessage($notificationType = 'instant') {
+               $authors = array_values($this->getAuthors());
                $comment = CommentDataHandler::getInstance()->getComment($this->userNotificationObject->commentID);
-               $user = new User($comment->objectID);
+               $count = count($authors);
+               $owner = CommentDataHandler::getInstance()->getUser($comment->objectID);
+               
+               if ($count > 1) {
+                       return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.mail.stacked', array(
+                               'author' => $this->author,
+                               'authors' => $authors,
+                               'count' => $count,
+                               'notificationType' => $notificationType,
+                               'others' => $count - 1,
+                               'owner' => $owner,
+                               'response' => $this->userNotificationObject
+                       ));
+               }
                
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.commentResponse.mail', array(
                        'response' => $this->userNotificationObject,
                        'author' => $this->author,
-                       'owner' => $user,
+                       'owner' => $owner,
                        'notificationType' => $notificationType
                ));
        }
index 5851a937ec9c32238cde56378d3325dac18ae512..4e29a2f437871319c983a8f1ec9bb21969247404 100644 (file)
@@ -61,8 +61,21 @@ class UserProfileCommentUserNotificationEvent extends AbstractUserNotificationEv
         * @see \wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
        public function getEmailMessage($notificationType = 'instant') {
+               $authors = array_values($this->getAuthors());
+               $count = count($authors);
                $user = new User($this->userNotificationObject->objectID);
                
+               if ($count > 1) {
+                       return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail.stacked', array(
+                               'author' => $this->author,
+                               'authors' => $authors,
+                               'count' => $count,
+                               'others' => $count - 1,
+                               'owner' => $user,
+                               'notificationType' => $notificationType
+                       ));
+               }
+               
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail', array(
                        'comment' => $this->userNotificationObject,
                        'author' => $this->author,
index b7a76552d3d55df428acb82e4ef5fc37fdcbf2d9..e878c771d8f4823db328cbafd2b9d5d2abdebd4b 100644 (file)
@@ -2907,7 +2907,7 @@ Sollten Sie sich nicht auf der Website: {@PAGE_TITLE|language} angemeldet haben,
                <item name="wcf.user.notification.button.confirmed"><![CDATA[OK]]></item>
                <item name="wcf.user.notification.count"><![CDATA[if (data.returnValues.count == 0) { "Keine Benachrichtigungen" } else if (data.returnValues.count == 1) { "Eine Benachrichtigung" } else { data.returnValues.count + " Benachrichtigungen" }]]></item>
                <item name="wcf.user.notification.follow.message"><![CDATA[„{$author->username}“ folgt Ihnen.]]></item>
-               <item name="wcf.user.notification.follow.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weiteren{/if} folgen Ihnen.]]></item>
+               <item name="wcf.user.notification.follow.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weiteren{/if} folgen Ihnen.]]></item>
                <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>
@@ -2945,40 +2945,50 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn
                <item name="wcf.user.notification.comment.title"><![CDATA[Neuer Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} neue Kommentare (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[Hat einen Kommentar an Ihrer Pinnwand verfasst.]]></item>
-               <item name="wcf.user.notification.comment.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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 Kommentare an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a> verfasst.]]></item>
+               <item name="wcf.user.notification.comment.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weitere{/if} haben Kommentare an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a> verfasst.]]></item>
                <item name="wcf.user.notification.comment.like.title"><![CDATA[Gefällt ein Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.like.title.stacked"><![CDATA[{#$count} Benutzern gefällt Ihr Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.comment.like.message"><![CDATA[Gefällt Ihr Kommentar an {if $owner === null}Ihrer Pinnwand{else}der Pinnwand von {$owner->username}{/if}.]]></item>
-               <item name="wcf.user.notification.comment.like.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weiteren{/if} gefällt Ihr Kommentar an {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if}.]]></item>
+               <item name="wcf.user.notification.comment.like.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weiteren{/if} gefällt Ihr Kommentar an {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if}.]]></item>
                <item name="wcf.user.notification.comment.mail"><![CDATA[{@$author->username} hat einen Kommentar an Ihrer Pinnwand verfasst:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$comment->message} 
 ---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
+               <item name="wcf.user.notification.comment.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} weitere{/if} haben Kommentare an Ihrer Pinnwand verfasst:
+{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponse.title"><![CDATA[Neue Antwort (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponse.title.stacked"><![CDATA[{#$timesTriggered} neue Antworten (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponse.message"><![CDATA[Hat eine Antwort zu Ihrem Kommentar an der Pinnwand von {$owner->username} verfasst.]]></item>
-               <item name="wcf.user.notification.commentResponse.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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}<a href="{link controller='User' object=$owner}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if} geantwortet.]]></item>
+               <item name="wcf.user.notification.commentResponse.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weitere{/if} haben auf Ihren Kommentar an {if $owner->userID == $__wcf->getUser()->userID}<a href="{link controller='User' object=$owner}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if} geantwortet.]]></item>
                <item name="wcf.user.notification.commentResponse.like.title"><![CDATA[Gefällt die Antwort auf einen Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponse.like.title.stacked"><![CDATA[{#$count} Benutzern gefällt Ihre Antwort auf einen Kommentar (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponse.like.message"><![CDATA[Gefällt Ihre Antwort auf einen Kommentar an {if $owner === null}Ihrer Pinnwand{else}der Pinnwand von {$owner->username}{/if}.]]></item>
-               <item name="wcf.user.notification.commentResponse.like.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$count} weiteren{/if} gefällt Ihre Antwort auf einen Kommentar an {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if}.]]></item>
+               <item name="wcf.user.notification.commentResponse.like.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weiteren{/if} gefällt Ihre Antwort auf einen Kommentar an {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a>{else}der <a href="{link controller='User' object=$owner}#wall{/link}">Pinnwand von {$owner->username}</a>{/if}.]]></item>
                <item name="wcf.user.notification.commentResponse.mail"><![CDATA[{@$author->username} hat eine Antwort zu Ihrem Kommentar an der Pinnwand von "{@$owner->username}" verfasst:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$response->message} 
 ---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
+               <item name="wcf.user.notification.commentResponse.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} weitere{/if} haben auf Ihren Kommentar an {if $owner->userID == $__wcf->getUser()->userID}Ihrer Pinnwand{else}der Pinnwand von {$owner->username}{/if} geantwortet:
+{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title"><![CDATA[Neue Antwort (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title.stacked"><![CDATA[{#$timesTriggered} neue Antworten (Pinnwand)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.message"><![CDATA[Hat eine Antwort zum Kommentar von {$commentAuthor->username} an Ihrer Pinnwand verfasst.]]></item>
-               <item name="wcf.user.notification.commentResponseOwner.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->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 den Kommentar von {if $author->userID}<a href="{link controller='User' object=$author}{/link}" class="userLink" data-user-id="{@$author->userID}">{$author->username}</a>{else}{$author->username}{/if} an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a> geantwortet.]]></item>
+               <item name="wcf.user.notification.commentResponseOwner.message.stacked"><![CDATA[{if $count < 4}{@$authors[0]->getAnchorTag()}{if $count == 2} und {else}, {/if}{@$authors[1]->getAnchorTag()}{if $count == 3} und {@$authors[2]->getAnchorTag()}{/if}{else}{@$authors[0]->getAnchorTag()} und {#$others} weitere{/if} haben auf den Kommentar von {if $author->userID}<a href="{link controller='User' object=$author}{/link}" class="userLink" data-user-id="{@$author->userID}">{$author->username}</a>{else}{$author->username}{/if} an <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">Ihrer Pinnwand</a> geantwortet.]]></item>
                <item name="wcf.user.notification.commentResponseOwner.mail"><![CDATA[{@$author->username} hat eine Antwort zum Kommentar von "{@$commentAuthor->username}" an Ihrer Pinnwand verfasst:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$response->message} 
 ---------------------------------
+{/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
+               <item name="wcf.user.notification.commentResponseOwner.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} weitere{/if} haben auf den Kommentar von {$author->username} an Ihrer Pinnwand geantwortet:
+{if $notificationType == 'instant'}
+---------------------------------
+{@$response->message} 
+---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.notification.comment"><![CDATA[Neuer Kommentar an Ihrer Pinnwand]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponse"><![CDATA[Neue Antwort auf einen Kommentar an Ihrer Pinnwand]]></item>
index 0d127944ed98d7d4934eb34c7d547208a70e5a25..01c8cbcbb6719b68633f3fd327dadba366e3ab3f 100644 (file)
@@ -2767,7 +2767,7 @@ You can safely ignore this email if you did not register with the website: {@PAG
                <item name="wcf.user.notification.button.confirmed"><![CDATA[OK]]></item>
                <item name="wcf.user.notification.count"><![CDATA[if (data.returnValues.count == 0) { "No Notifications" } else if (data.returnValues.count == 1) { "1 Notification" } else { data.returnValues.count + " Notifications" }]]></item>
                <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 {#$count} others{/if} follow 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.title"><![CDATA[New Follower]]></item>
                <item name="wcf.user.notification.follow.title.stacked"><![CDATA[{#$count} new followers]]></item>
@@ -2805,41 +2805,47 @@ If you do not want to receive further email notifications for this event, you ca
                <item name="wcf.user.notification.comment.title"><![CDATA[New Comment (Wall)]]></item>
                <item name="wcf.user.notification.comment.title.stacked"><![CDATA[{#$timesTriggered} new comments (Wall)]]></item>
                <item name="wcf.user.notification.comment.message"><![CDATA[Wrote a comment on your wall.]]></item>
-               <item name="wcf.user.notification.comment.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 {#$count} others{/if} wrote comments on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
+               <item name="wcf.user.notification.comment.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} wrote comments on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
                <item name="wcf.user.notification.comment.like.title"><![CDATA[Likes a comment (Wall)]]></item>
                <item name="wcf.user.notification.comment.like.title.stacked"><![CDATA[{#$count} users like your comment (Wall)]]></item>
                <item name="wcf.user.notification.comment.like.message"><![CDATA[Likes your comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if}.]]></item>
-               <item name="wcf.user.notification.comment.like.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 {#$count} others{/if} like your comment on {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>{else}<a href="{link controller='User' object=$owner}#wall{/link}">{$owner->username}’s wall</a>{/if}.]]></item>
+               <item name="wcf.user.notification.comment.like.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} like your comment on {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>{else}<a href="{link controller='User' object=$owner}#wall{/link}">{$owner->username}’s wall</a>{/if}.]]></item>
                <item name="wcf.user.notification.comment.mail"><![CDATA[{@$author->username} wrote a comment on your wall:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$comment->message} 
 ---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
+               <item name="wcf.user.notification.comment.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} wrote comments on your wall:
+{link controller='User' object=$owner isEmail=true}#wall{/link}]]></item>
                <item name="wcf.user.notification.commentResponse.title"><![CDATA[New Reply (Wall)]]></item>
                <item name="wcf.user.notification.commentResponse.title.stacked"><![CDATA[{#$timesTriggered} new replies (Wall)]]></item>
                <item name="wcf.user.notification.commentResponse.message"><![CDATA[Wrote a reply to your comment on {$owner->username}’s wall.]]></item>
-               <item name="wcf.user.notification.commentResponse.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 {#$count} others{/if} replied to your comment on <a href="{link controller='User' object=$owner}#wall{/link}">{if $owner->userID == $__wcf->getUser()->userID}your{else}{$owner->username}’s{/if} wall</a>.]]></item>
+               <item name="wcf.user.notification.commentResponse.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} replied to your comment on <a href="{link controller='User' object=$owner}#wall{/link}">{if $owner->userID == $__wcf->getUser()->userID}your{else}{$owner->username}’s{/if} wall</a>.]]></item>
                <item name="wcf.user.notification.commentResponse.like.title"><![CDATA[Likes your reply to a comment (Wall)]]></item>
                <item name="wcf.user.notification.commentResponse.like.title.stacked"><![CDATA[{#$count} users like your reply to a comment (Wall)]]></item>
                <item name="wcf.user.notification.commentResponse.like.message"><![CDATA[Likes your reply to a comment on {if $owner === null}your wall{else}{$owner->username}’s wall{/if}.]]></item>
-               <item name="wcf.user.notification.commentResponse.like.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 {#$count} others{/if} like your reply to a comment on {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>{else}<a href="{link controller='User' object=$owner}#wall{/link}">{$owner->username}’s wall</a>{/if}.]]></item>
+               <item name="wcf.user.notification.commentResponse.like.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} like your reply to a comment on {if $owner === null}<a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>{else}<a href="{link controller='User' object=$owner}#wall{/link}">{$owner->username}’s wall</a>{/if}.]]></item>
                <item name="wcf.user.notification.commentResponse.mail"><![CDATA[{@$author->username} wrote a reply to your comment on {@$owner->username}’s wall:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$response->message} 
 ---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
+               <item name="wcf.user.notification.commentResponse.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} replied to your comment on {if $owner->userID == $__wcf->getUser()->userID}your{else}{$owner->username}'s{/if} wall:
+{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title"><![CDATA[New Reply (Wall)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.title.stacked"><![CDATA[{#$timesTriggered} new replies (Wall)]]></item>
                <item name="wcf.user.notification.commentResponseOwner.message"><![CDATA[Wrote a reply to {$commentAuthor->username}’s comment on your wall.]]></item>
-               <item name="wcf.user.notification.commentResponseOwner.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 {#$count} others{/if} replied to the comment by {if $author->userID}<a href="{link controller='User' object=$author}{/link}" class="userLink" data-user-id="{@$author->userID}">{$author->username}</a>{else}{$author->username}{/if} on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
+               <item name="wcf.user.notification.commentResponseOwner.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} replied to the comment by {if $author->userID}<a href="{link controller='User' object=$author}{/link}" class="userLink" data-user-id="{@$author->userID}">{$author->username}</a>{else}{$author->username}{/if} on <a href="{link controller='User' object=$__wcf->getUser()}#wall{/link}">your wall</a>.]]></item>
                <item name="wcf.user.notification.commentResponseOwner.mail"><![CDATA[{@$author->username} wrote a reply to {@$commentAuthor->username}’s comment on your wall:
 {if $notificationType == 'instant'}
 ---------------------------------
 {@$response->message} 
 ---------------------------------
 {/if}{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
+               <item name="wcf.user.notification.commentResponseOwner.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} replied to the comment by {$author->username} on your wall:
+{link controller='User' object=$owner isEmail=true}{/link}#wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.notification.comment"><![CDATA[New comment on your wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponse"><![CDATA[New reply to a comment on your wall]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.user.profileComment.response.notification.commentResponseOwner"><![CDATA[New reply to one of your comments]]></item>