r94174 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94173‎ | r94174 | r94175 >
Date:17:46, 10 August 2011
Author:aaron
Status:ok
Tags:
Comment:
Moved 'patrolmarks' rights setting under $wgFlaggedRevsRCCrap (needed for bug 24053)
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -1,7 +1,7 @@
22 <?php
33 /*
44 (c) Aaron Schulz, Joerg Baach, 2007-2008 GPL
5 -
 5+
66 This program is free software; you can redistribute it and/or modify
77 it under the terms of the GNU General Public License as published by
88 the Free Software Foundation; either version 2 of the License, or
@@ -114,7 +114,6 @@
115115 $wgGroupPermissions['editor']['autoreview'] = true;
116116 $wgGroupPermissions['editor']['autoconfirmed'] = true;
117117 $wgGroupPermissions['editor']['unreviewedpages'] = true;
118 -$wgGroupPermissions['editor']['patrolmarks'] = true;
119118
120119 # Define when users get automatically promoted to Editors. Set as false to disable.
121120 # Once users meet these requirements they will be promoted, unless previously demoted.
@@ -161,7 +160,6 @@
162161 $wgGroupPermissions['reviewer']['autoreview'] = true;
163162 $wgGroupPermissions['reviewer']['autoconfirmed'] = true;
164163 $wgGroupPermissions['reviewer']['unreviewedpages'] = true;
165 -$wgGroupPermissions['reviewer']['patrolmarks'] = true;
166164
167165 # Sysops have their edits autoreviewed
168166 $wgGroupPermissions['sysop']['autoreview'] = true;
@@ -218,7 +216,7 @@
219217 # Patrollable namespaces (overridden by reviewable namespaces) (don't use)
220218 $wgFlaggedRevsPatrolNamespaces = array(); // @TODO: remove when ready
221219
222 -# Bots are granted autoreview via hooks, mark in rights
 220+# Bots are granted autoreview via hooks, mark in rights
223221 # array so that it shows up in sp:ListGroupRights...
224222 $wgGroupPermissions['bot']['autoreview'] = true;
225223
@@ -549,10 +547,10 @@
550548
551549 // Note: avoid calls to FlaggedRevs class here for performance
552550 function efLoadFlaggedRevs() {
553 - global $wgFlaggedRevsRCCrap, $wgUseRCPatrol;
 551+ global $wgFlaggedRevsRCCrap, $wgUseRCPatrol, $wgGroupPermissions;
554552 global $wgFlaggedRevsNamespaces, $wgFlaggedRevsProtection;
555553 if ( $wgFlaggedRevsRCCrap ) {
556 - # If patrolling is already on, then we know that it
 554+ # If patrolling is already on, then we know that it
557555 # was intended to have all namespaces patrollable.
558556 if ( $wgUseRCPatrol ) {
559557 global $wgFlaggedRevsPatrolNamespaces;
@@ -565,6 +563,16 @@
566564 # Edits to reviewable pages must be flagged to be patrolled.
567565 $wgUseRCPatrol = true;
568566 }
 567+ if ( isset( $wgGroupPermissions['editor'] )
 568+ && !isset( $wgGroupPermissions['editor']['patrolmarks'] ) )
 569+ {
 570+ $wgGroupPermissions['editor']['patrolmarks'] = true;
 571+ }
 572+ if ( isset( $wgGroupPermissions['reviewer'] )
 573+ && !isset( $wgGroupPermissions['reviewer']['patrolmarks'] ) )
 574+ {
 575+ $wgGroupPermissions['reviewer']['patrolmarks'] = true;
 576+ }
569577 }
570578
571579 # Conditional autopromote groups

Status & tagging log