From: Marcel Werk Date: Thu, 6 Jun 2013 18:58:24 +0000 (+0200) Subject: Improved e-mail notifications X-Git-Tag: 2.0.0_Beta_4~113 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=edfb4729e7f0fb15cdf91c44a492cb9f794e1e1d;p=GitHub%2FWoltLab%2FWCF.git Improved e-mail notifications --- diff --git a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php index 34e398b3e6..d012e727ad 100644 --- a/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php index 08bcd768a1..d70be84266 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php @@ -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(); } diff --git a/wcfsetup/install/files/lib/system/user/notification/event/IUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/IUserNotificationEvent.class.php index a149a7e6f0..e1f6020227 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/IUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/IUserNotificationEvent.class.php @@ -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. 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 c8739b24b9..864e658d68 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 @@ -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)); } diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php index 5436520419..e20a2cd01b 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseOwnerUserNotificationEvent.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php index e5d4b8c385..54772a584e 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseUserNotificationEvent.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php index 0c1f7cf976..e562acf24f 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentUserNotificationEvent.class.php @@ -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(