Cenarium has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328111 )

Change subject: Make patrol of reviewed changes optional
......................................................................

Make patrol of reviewed changes optional

On some wikis, such as enwiki, reviewers don't have patrol rights and
the criteria for patrolling are higher than those for reviewing. A
config variable is thus added so that on those wikis, reviewing a change
does not make the associated recent change patrolled.

Change-Id: I1cd62e289e616e2e572bd3e1faecf7a8367b7ef3
---
M FlaggedRevs.php
M backend/FlaggedRevs.class.php
M business/RevisionReviewForm.php
3 files changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/11/328111/1

diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index d78e9e1..842852f 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -217,6 +217,9 @@
 # In such cases, we select the current (unreviewed) revision. Likewise for 
files.
 $wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE;
 
+# Whether reviewing a revision should make the associated recent change 
patrolled
+$wgFlaggedRevsPatrolReviewedChanges = true;
+
 $dir = dirname( __FILE__ );
 
 # Basic directory layout
diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
index ff630a3..f2c5915 100755
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -310,6 +310,15 @@
        }
 
        /**
+        * Whether manual review => patrol
+        * @return bool
+        */
+       public static function patrolReviewedChanges() {
+               global $wgFlaggedRevsPatrolReviewedChanges;
+               return $wgFlaggedRevsPatrolReviewedChanges;
+       }
+
+       /**
         * Get the array of tag dimensions and level messages
         * @return array
         */
diff --git a/business/RevisionReviewForm.php b/business/RevisionReviewForm.php
index 2036b09..4354a11 100644
--- a/business/RevisionReviewForm.php
+++ b/business/RevisionReviewForm.php
@@ -470,8 +470,10 @@
 
                # Get the new stable version as of now
                $sv = FlaggedRevision::determineStable( $this->page, FR_MASTER 
/*consistent*/ );
-               # Update recent changes...
-               self::updateRecentChanges( $rev, 'patrol', $sv );
+               if ( FlaggedRevs::patrolReviewedChanges() ) {
+                       # Update recent changes...
+                       self::updateRecentChanges( $rev, 'patrol', $sv );
+               }
                # Update page and tracking tables and clear cache
                $changed = FlaggedRevs::stableVersionUpdates( $this->page, $sv, 
$oldSv );
                if ( $changed ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/328111
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cd62e289e616e2e572bd3e1faecf7a8367b7ef3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Cenarium <cenarium.sy...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to