$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
This commit is contained in:
saper 2015-11-02 14:37:25 +01:00 committed by Legoktm
parent d2d935483f
commit f415a29a15

View file

@ -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!