Fixed notification issues
authorMarcel Werk <burntime@woltlab.com>
Sat, 6 Apr 2013 00:08:27 +0000 (02:08 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 6 Apr 2013 00:08:27 +0000 (02:08 +0200)
files/lib/system/user/notification/event/ConversationMessageUserNotificationEvent.class.php
files/lib/system/user/notification/event/ConversationUserNotificationEvent.class.php
language/de.xml
language/en.xml

index 4902fc2f14f60a2466b46280f75a999bece99e3d..ab4fa9f75011eb69059b78eb8be03bbe9198b502 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 namespace wcf\system\user\notification\event;
 use wcf\system\user\notification\event\AbstractUserNotificationEvent;
-use wcf\system\WCF;
 
 /**
  * User notification event for conversation messages.
@@ -18,15 +17,25 @@ class ConversationMessageUserNotificationEvent extends AbstractUserNotificationE
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
         */
        public function getTitle() {
-               return WCF::getLanguage()->get('wcf.user.notification.conversation.message.shortOutput');
+               return $this->getLanguage()->get('wcf.user.notification.conversation.message.title');
        }
        
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
         */
        public function getMessage() {
-               return WCF::getLanguage()->getDynamicVariable('wcf.user.notification.conversation.message.output', array(
+               return $this->getLanguage()->getDynamicVariable('wcf.user.notification.conversation.message.message', array(
                        'message' => $this->userNotificationObject,
                ));
        }
+       
+       /**
+        * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
+        */
+       public function getEmailMessage() {
+               return $this->getLanguage()->getDynamicVariable('wcf.user.notification.conversation.message.mail', array(
+                       'message' => $this->userNotificationObject,
+                       'author' => $this->author
+               ));
+       }
 }
index 9b6a032badca063b587492a61d8b796fb0c30395..fa8a4a4cf61d20b90a0b91309b3497c0297d90f0 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 namespace wcf\system\user\notification\event;
 use wcf\system\user\notification\event\AbstractUserNotificationEvent;
-use wcf\system\WCF;
 
 /**
  * User notification event for conversations.
@@ -18,15 +17,25 @@ class ConversationUserNotificationEvent extends AbstractUserNotificationEvent {
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
         */
        public function getTitle() {
-               return WCF::getLanguage()->get('wcf.user.notification.conversation.shortOutput');
+               return $this->getLanguage()->get('wcf.user.notification.conversation.title');
        }
        
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getMessage()
         */
        public function getMessage() {
-               return WCF::getLanguage()->getDynamicVariable('wcf.user.notification.conversation.output', array(
+               return $this->getLanguage()->getDynamicVariable('wcf.user.notification.conversation.message', array(
                        'conversation' => $this->userNotificationObject,
                ));
        }
+       
+       /**
+        * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
+        */
+       public function getEmailMessage() {
+               return $this->getLanguage()->getDynamicVariable('wcf.user.notification.conversation.mail', array(
+                       'conversation' => $this->userNotificationObject,
+                       'author' => $this->author
+               ));
+       }
 }
index 0476b66a181a1ae293e8edcf5b7970c9d1b6db8e..a15ad6d9e83a261ec3ed3b1ef8b89a5b11cc6e1f 100644 (file)
        </category>
        
        <category name="wcf.user.notification">
-               <item name="wcf.user.notification.conversation.message.output"><![CDATA[Hat auf die Konversation „<a href="{link controller='Conversation' object=$message->getConversation()}messageID={@$message->messageID}{/link}#message{@$message->messageID}">{$message->getTitle()}</a>“ geantwortet.]]></item>
-               <item name="wcf.user.notification.conversation.message.shortOutput"><![CDATA[Neue Antwort auf Konversation]]></item>            
-               <item name="wcf.user.notification.conversation.output"><![CDATA[Hat die Konversation „<a href="{link controller='Conversation' object=$conversation}{/link}">{$conversation->subject}</a>“ gestartet.]]></item>
-               <item name="wcf.user.notification.conversation.shortOutput"><![CDATA[Neue Konversation]]></item>
+               <item name="wcf.user.notification.conversation.message.message"><![CDATA[Hat auf die Konversation „<a href="{link controller='Conversation' object=$message->getConversation()}messageID={@$message->messageID}{/link}#message{@$message->messageID}">{$message->getTitle()}</a>“ geantwortet.]]></item>
+               <item name="wcf.user.notification.conversation.message.title"><![CDATA[Neue Antwort auf Konversation]]></item>
+               <item name="wcf.user.notification.conversation.message.mail"><![CDATA[{@$author->username} hat auf die Konversation "{@$message->getTitle()}" geantwortet:
+{link controller='Conversation' object=$message->getConversation() encode=false forceFrontend=true}messageID={@$message->messageID}{/link}#message{@$message->messageID}]]></item>
+               <item name="wcf.user.notification.conversation.message"><![CDATA[Hat die Konversation „<a href="{link controller='Conversation' object=$conversation}{/link}">{$conversation->subject}</a>“ gestartet.]]></item>
+               <item name="wcf.user.notification.conversation.title"><![CDATA[Neue Konversation]]></item>
+               <item name="wcf.user.notification.conversation.mail"><![CDATA[{@$author->username} hat die Konversation "{@$conversation->subject}" gestartet:
+{link controller='Conversation' object=$conversation encode=false forceFrontend=true}{/link}]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation"><![CDATA[Konversationen]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.notification.conversation"><![CDATA[Neue Konversation]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.message.notification.conversationMessage"><![CDATA[Antwort auf bestehende Konversation]]></item>
index 2138e3881805d3cfadb4cdaaa92469b6b3cdc500..0d60d64c6823028ab0b4b9a6120927f206eaccbd 100644 (file)
        </category>
        
        <category name="wcf.user.notification">
-               <item name="wcf.user.notification.conversation.message.output"><![CDATA[Replied to the conversation “<a href="{link controller='Conversation' object=$message->getConversation()}messageID={@$message->messageID}{/link}#message{@$message->messageID}">{$message->getTitle()}</a>”.]]></item>
-               <item name="wcf.user.notification.conversation.message.shortOutput"><![CDATA[New Reply to a Conversation]]></item>              
-               <item name="wcf.user.notification.conversation.output"><![CDATA[Started the conversation “<a href="{link controller='Conversation' object=$conversation}{/link}">{$conversation->subject}</a>”.]]></item>
-               <item name="wcf.user.notification.conversation.shortOutput"><![CDATA[New Conversation]]></item>
+               <item name="wcf.user.notification.conversation.message.message"><![CDATA[Replied to the conversation “<a href="{link controller='Conversation' object=$message->getConversation()}messageID={@$message->messageID}{/link}#message{@$message->messageID}">{$message->getTitle()}</a>”.]]></item>
+               <item name="wcf.user.notification.conversation.message.title"><![CDATA[New Reply to a Conversation]]></item>
+               <item name="wcf.user.notification.conversation.message.mail"><![CDATA[{@$author->username} replied to the conversation "{@$message->getTitle()}":
+{link controller='Conversation' object=$message->getConversation() encode=false forceFrontend=true}messageID={@$message->messageID}{/link}#message{@$message->messageID}]]></item>
+               <item name="wcf.user.notification.conversation.message"><![CDATA[Started the conversation “<a href="{link controller='Conversation' object=$conversation}{/link}">{$conversation->subject}</a>”.]]></item>
+               <item name="wcf.user.notification.conversation.title"><![CDATA[New Conversation]]></item>
+               <item name="wcf.user.notification.conversation.mail"><![CDATA[{@$author->username} started the conversation "{@$conversation->subject}":
+{link controller='Conversation' object=$conversation encode=false forceFrontend=true}{/link}]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation"><![CDATA[Conversations]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.notification.conversation"><![CDATA[New conversation]]></item>
                <item name="wcf.user.notification.com.woltlab.wcf.conversation.message.notification.conversationMessage"><![CDATA[Reply to existing conversation]]></item>