From f415a29a157e8b33db65eded6304081e9b3072da Mon Sep 17 00:00:00 2001 From: saper Date: Mon, 2 Nov 2015 14:37:25 +0100 Subject: [PATCH] $wgUsersNotifiedOnAllChanges should not send mail twice Also make sure that normal watchlist functionality works for the $wgUsersNotifiedOnAllChanges, for example changes should marked 'bold' since last visit. Bug: T69041 Change-Id: I7d53f07ed3dceb5b1c541091fd69beca3fb3e94f --- includes/mail/EmailNotification.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index 044bb5343d..f557c1abd0 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -216,6 +216,7 @@ class EmailNotification { public function actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers, $pageStatus = 'changed' ) { # we use $wgPasswordSender as sender's address + global $wgUsersNotifiedOnAllChanges; global $wgEnotifWatchlist, $wgBlockDisablesLogin; global $wgEnotifMinorEdits, $wgEnotifUserTalk; @@ -262,6 +263,7 @@ class EmailNotification { && ( !$minorEdit || $watchingUser->getOption( 'enotifminoredits' ) ) && $watchingUser->isEmailConfirmed() && $watchingUser->getID() != $userTalkId + && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges ) && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() ) ) { if ( Hooks::run( 'SendWatchlistEmailNotification', array( $watchingUser, $title, $this ) ) ) { @@ -272,7 +274,6 @@ class EmailNotification { } } - global $wgUsersNotifiedOnAllChanges; foreach ( $wgUsersNotifiedOnAllChanges as $name ) { if ( $editor->getName() == $name ) { // No point notifying the user that actually made the change! -- 2.20.1