r83182 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83181‎ | r83182 | r83183 >
Date:23:54, 3 March 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Revert r77111 due to many people not liking the behaviour.

Back to the idea that if you have 'ccmeonemails' enabled, it will send you them. Maybe not the best idea, as it's reusing preferences. Revert r74967 if that isn't wanted also
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -417,6 +417,14 @@
418418
419419 //Notify commenters and revision author of followup revision
420420 foreach ( $users as $user ) {
 421+ // Notify user with its own message if he already want
 422+ // to be CCed of all emails it sends.
 423+ if ( $commitAuthorId == $user->getId() ) {
 424+ if( !$user->getBoolOption( 'ccmeonemails' ) ) {
 425+ continue;
 426+ }
 427+ }
 428+
421429 if ( $user->canReceiveEmail() ) {
422430 // Send message in receiver's language
423431 $lang = array( 'language' => $user->getOption( 'language' ) );
@@ -590,7 +598,7 @@
591599 public function emailNotifyUsersOfChanges( $subject, $body ) {
592600 // Give email notices to committer and commenters
593601 global $wgCodeReviewENotif, $wgEnableEmail, $wgCodeReviewCommentWatcherEmail,
594 - $wgCodeReviewCommentWatcherName;
 602+ $wgCodeReviewCommentWatcherName, $wgUser;
595603 if ( !$wgCodeReviewENotif || !$wgEnableEmail ) {
596604 return;
597605 }
@@ -614,6 +622,14 @@
615623 }
616624
617625 foreach ( $users as $id => $user ) {
 626+ // Notify user with its own message if he already want
 627+ // to be CCed of all emails it sends.
 628+ if ( $wgUser->getId() == $user->getId() ) {
 629+ if( !$user->getBoolOption( 'ccmeonemails' ) ) {
 630+ continue;
 631+ }
 632+ }
 633+
618634 // canReceiveEmail() returns false for the fake watcher user, so exempt it
619635 // This is ugly
620636 if ( $id == 0 || $user->canReceiveEmail() ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r83185MFT r83182, r83184reedy00:03, 4 March 2011
r83186MFT r83182, r83184reedy00:06, 4 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74967* Let user receives its own comments by emails if already wants...hashar20:50, 18 October 2010
r77111unconditionally send email to comment author...hashar19:16, 22 November 2010

Comments

#Comment by Hashar (talk | contribs)   07:57, 4 March 2011

Thanks Reedy for saving the developers mailboxes :-p

Status & tagging log