https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114011
Revision: 114011
Author: happydog
Date: 2012-03-16 11:54:17 +0000 (Fri, 16 Mar 2012)
Log Message:
-----------
(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
trunk/extensions/CodeReview/backend/CodeRevision.php
Modified: trunk/extensions/CodeReview/CodeReview.php
===================================================================
--- trunk/extensions/CodeReview/CodeReview.php 2012-03-16 11:44:37 UTC (rev
114010)
+++ trunk/extensions/CodeReview/CodeReview.php 2012-03-16 11:54:17 UTC (rev
114011)
@@ -173,6 +173,15 @@
// Name to use in the To: header of e-mails to the list. Ignored if
$wgCodeReviewCommentWatcherEmail isn't set
$wgCodeReviewCommentWatcherName = "CodeReview comments list";
+// 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.
+$wgCodeReviewDisableFollowUpNotification = false;
+
// What images can be used for client-side side-by-side comparisons?
$wgCodeReviewImgRegex = '/\.(png|jpg|jpeg|gif)$/i';
Modified: trunk/extensions/CodeReview/backend/CodeRevision.php
===================================================================
--- trunk/extensions/CodeReview/backend/CodeRevision.php 2012-03-16
11:44:37 UTC (rev 114010)
+++ trunk/extensions/CodeReview/backend/CodeRevision.php 2012-03-16
11:54:17 UTC (rev 114011)
@@ -440,9 +440,9 @@
$this->addReferencesTo( $affectedRevs );
}
- global $wgEnableEmail;
+ global $wgEnableEmail, $wgCodeReviewDisableFollowUpNotification;
// Email the authors of revisions that this follows up on
- if ( $wgEnableEmail && $newRevision && count( $affectedRevs ) >
0 ) {
+ if ( $wgEnableEmail &&
!$wgCodeReviewDisableFollowUpNotification && $newRevision && count(
$affectedRevs ) > 0 ) {
// Get committer wiki user name, or repo name at least
$commitAuthor = $this->getWikiUser();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs