Improved e-mail notifications
authorMarcel Werk <burntime@woltlab.com>
Thu, 6 Jun 2013 18:58:24 +0000 (20:58 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 6 Jun 2013 18:58:24 +0000 (20:58 +0200)
wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php
wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/IUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserFollowFollowingUserNotificationEvent.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

index 34e398b3e62bc1c4a1e98f7f64b54abe6a8aeb64..d012e727ad79fe2781157bf7c240a3b8a051d120 100644 (file)
@@ -145,7 +145,7 @@ class DailyMailNotificationCronjob extends AbstractCronjob {
                                $class->setLanguage($user->getLanguage());
                                
                                if ($message != '') $message .= "\n\n";
-                               $message .= $class->getEmailMessage();
+                               $message .= $class->getEmailMessage('daily');
                        }
                        
                        // append notification mail footer
index 08bcd768a1ef2d64d950ab6e21fa97d08c843924..d70be84266338ade2a7299691e95ebdf68a41841 100644 (file)
@@ -95,7 +95,7 @@ abstract class AbstractUserNotificationEvent extends DatabaseObjectDecorator imp
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
-       public function getEmailMessage() {
+       public function getEmailMessage($notificationType = 'instant') {
                return $this->getMessage();
        }
        
index a149a7e6f0cb2b4ed7ab971012fe7be7176f5266..e1f6020227b0bb41d3a58b61a540d80780809741 100644 (file)
@@ -48,9 +48,10 @@ interface IUserNotificationEvent extends IDatabaseObjectProcessor {
        /**
         * Returns the message for this notification event.
         *
+        * @param       string          $notificationType
         * @return      string
         */
-       public function getEmailMessage();
+       public function getEmailMessage($notificationType = 'instant');
        
        /**
         * Returns the author id for this notification event.
index c8739b24b9da1506216d87dd95f50c2c0d40b3a2..864e658d68911ea2ac8595d25e9bd9ef5f4ab0c8 100644 (file)
@@ -32,7 +32,7 @@ class UserFollowFollowingUserNotificationEvent extends AbstractUserNotificationE
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
-       public function getEmailMessage() {
+       public function getEmailMessage($notificationType = 'instant') {
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.follow.mail', array('author' => $this->author));
        }
        
index 543652041936e593e8f4997603c19d5535e70792..e20a2cd01ba79cd0cef22a195798793dd940b617 100644 (file)
@@ -41,7 +41,7 @@ class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractUserN
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
-       public function getEmailMessage() {
+       public function getEmailMessage($notificationType = 'instant') {
                $comment = new Comment($this->userNotificationObject->commentID);
                $commentAuthor = new User($comment->userID);
                $owner = new User($comment->objectID);
index e5d4b8c3857588e909e582c7a29f2bd34ca36a45..54772a584e1dbaad8049e7e52b754562ee566218 100644 (file)
@@ -40,7 +40,7 @@ class UserProfileCommentResponseUserNotificationEvent extends AbstractUserNotifi
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
-       public function getEmailMessage() {
+       public function getEmailMessage($notificationType = 'instant') {
                $comment = new Comment($this->userNotificationObject->commentID);
                $user = new User($comment->objectID);
                
index 0c1f7cf97621fb1f7ad729f952e4c0b7968b6fc0..e562acf24f1f29ddc7d78c4924223b4a19dea75b 100644 (file)
@@ -35,7 +35,7 @@ class UserProfileCommentUserNotificationEvent extends AbstractUserNotificationEv
        /**
         * @see wcf\system\user\notification\event\IUserNotificationEvent::getEmailMessage()
         */
-       public function getEmailMessage() {
+       public function getEmailMessage($notificationType = 'instant') {
                $user = new User($this->userNotificationObject->objectID);
                
                return $this->getLanguage()->getDynamicVariable('wcf.user.notification.comment.mail', array(