From: Sam Reed Date: Mon, 23 Jan 2012 15:04:22 +0000 (+0000) Subject: Bug 33880 - $wgUsersNotifiedOnAllChanges should not send e-mail to user who made... X-Git-Tag: 1.31.0-rc.0~25122 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=5d635eb62d9a1ab8c9053dc03d727b2fb08c2a4e;p=lhc%2Fweb%2Fwiklou.git Bug 33880 - $wgUsersNotifiedOnAllChanges should not send e-mail to user who made the edit. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 0150d359fa..1a2eeb37b3 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -231,6 +231,8 @@ production. * (bug 33819) Display file sizes in appropriate units. * (bug 32948) {{REVISIONID}} and related variables are no longer blank after doing a null edit. +* (bug 33880) $wgUsersNotifiedOnAllChanges should not send e-mail to user who made + the edit. === API changes in 1.19 === * Made action=edit less likely to return "unknownerror", by returning the actual error diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 20e77b878d..ba67efceb4 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -512,6 +512,10 @@ class EmailNotification { global $wgUsersNotifiedOnAllChanges; foreach ( $wgUsersNotifiedOnAllChanges as $name ) { + if ( $editor->getName() == $name ) { + // No point notifying the user that actually made the change! + continue; + } $user = User::newFromName( $name ); $this->compose( $user ); }