r114011 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114010‎ | r114011 | r114012 >
Date:11:54, 16 March 2012
Author:happydog
Status:ok
Tags:
Comment:
(bug 35217) [CodeReview] As per the bug, I have added a new config setting, $wgCodeReviewDisableFollowUpNotification, which is probably pretty self-explanatory. Set this flag to true if you want to disable the automatic notifications to all watchers of a specific revision, when a follow-up to that revision is committed. Useful for small repos when everyone is reading the commit e-mails anyway, or if you have multiple repositories which refer to one another, which result in an unreasonable level of false positives. Note that the new revision will still be marked as a follow-up - this setting just stops the e-mail being sent.

The default value of false means that behaviour will remain unchanged for existing installations.
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -173,6 +173,15 @@
174174 // Name to use in the To: header of e-mails to the list. Ignored if $wgCodeReviewCommentWatcherEmail isn't set
175175 $wgCodeReviewCommentWatcherName = "CodeReview comments list";
176176
 177+// Set this flag to true if you want to disable the automatic notifications to all
 178+// watchers of a specific revision, when a follow-up to that revision is committed.
 179+// Useful for small repos when everyone is reading the commit e-mails anyway,
 180+// or if you have multiple repositories which refer to one another, which result
 181+// in an unreasonable level of false positives.
 182+// Note that the new revision will still be marked as a follow-up - this setting
 183+// just stops the e-mail being sent.
 184+$wgCodeReviewDisableFollowUpNotification = false;
 185+
177186 // What images can be used for client-side side-by-side comparisons?
178187 $wgCodeReviewImgRegex = '/\.(png|jpg|jpeg|gif)$/i';
179188
Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -440,9 +440,9 @@
441441 $this->addReferencesTo( $affectedRevs );
442442 }
443443
444 - global $wgEnableEmail;
 444+ global $wgEnableEmail, $wgCodeReviewDisableFollowUpNotification;
445445 // Email the authors of revisions that this follows up on
446 - if ( $wgEnableEmail && $newRevision && count( $affectedRevs ) > 0 ) {
 446+ if ( $wgEnableEmail && !$wgCodeReviewDisableFollowUpNotification && $newRevision && count( $affectedRevs ) > 0 ) {
447447 // Get committer wiki user name, or repo name at least
448448 $commitAuthor = $this->getWikiUser();
449449

Status & tagging log