Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -417,6 +417,14 @@ |
418 | 418 | |
419 | 419 | //Notify commenters and revision author of followup revision |
420 | 420 | 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 | + |
421 | 429 | if ( $user->canReceiveEmail() ) { |
422 | 430 | // Send message in receiver's language |
423 | 431 | $lang = array( 'language' => $user->getOption( 'language' ) ); |
— | — | @@ -590,7 +598,7 @@ |
591 | 599 | public function emailNotifyUsersOfChanges( $subject, $body ) { |
592 | 600 | // Give email notices to committer and commenters |
593 | 601 | global $wgCodeReviewENotif, $wgEnableEmail, $wgCodeReviewCommentWatcherEmail, |
594 | | - $wgCodeReviewCommentWatcherName; |
| 602 | + $wgCodeReviewCommentWatcherName, $wgUser; |
595 | 603 | if ( !$wgCodeReviewENotif || !$wgEnableEmail ) { |
596 | 604 | return; |
597 | 605 | } |
— | — | @@ -614,6 +622,14 @@ |
615 | 623 | } |
616 | 624 | |
617 | 625 | 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 | + |
618 | 634 | // canReceiveEmail() returns false for the fake watcher user, so exempt it |
619 | 635 | // This is ugly |
620 | 636 | if ( $id == 0 || $user->canReceiveEmail() ) { |