Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /* |
4 | 4 | (c) Aaron Schulz, Joerg Baach, 2007-2008 GPL |
5 | | - |
| 5 | + |
6 | 6 | This program is free software; you can redistribute it and/or modify |
7 | 7 | it under the terms of the GNU General Public License as published by |
8 | 8 | the Free Software Foundation; either version 2 of the License, or |
— | — | @@ -114,7 +114,6 @@ |
115 | 115 | $wgGroupPermissions['editor']['autoreview'] = true; |
116 | 116 | $wgGroupPermissions['editor']['autoconfirmed'] = true; |
117 | 117 | $wgGroupPermissions['editor']['unreviewedpages'] = true; |
118 | | -$wgGroupPermissions['editor']['patrolmarks'] = true; |
119 | 118 | |
120 | 119 | # Define when users get automatically promoted to Editors. Set as false to disable. |
121 | 120 | # Once users meet these requirements they will be promoted, unless previously demoted. |
— | — | @@ -161,7 +160,6 @@ |
162 | 161 | $wgGroupPermissions['reviewer']['autoreview'] = true; |
163 | 162 | $wgGroupPermissions['reviewer']['autoconfirmed'] = true; |
164 | 163 | $wgGroupPermissions['reviewer']['unreviewedpages'] = true; |
165 | | -$wgGroupPermissions['reviewer']['patrolmarks'] = true; |
166 | 164 | |
167 | 165 | # Sysops have their edits autoreviewed |
168 | 166 | $wgGroupPermissions['sysop']['autoreview'] = true; |
— | — | @@ -218,7 +216,7 @@ |
219 | 217 | # Patrollable namespaces (overridden by reviewable namespaces) (don't use) |
220 | 218 | $wgFlaggedRevsPatrolNamespaces = array(); // @TODO: remove when ready |
221 | 219 | |
222 | | -# Bots are granted autoreview via hooks, mark in rights |
| 220 | +# Bots are granted autoreview via hooks, mark in rights |
223 | 221 | # array so that it shows up in sp:ListGroupRights... |
224 | 222 | $wgGroupPermissions['bot']['autoreview'] = true; |
225 | 223 | |
— | — | @@ -549,10 +547,10 @@ |
550 | 548 | |
551 | 549 | // Note: avoid calls to FlaggedRevs class here for performance |
552 | 550 | function efLoadFlaggedRevs() { |
553 | | - global $wgFlaggedRevsRCCrap, $wgUseRCPatrol; |
| 551 | + global $wgFlaggedRevsRCCrap, $wgUseRCPatrol, $wgGroupPermissions; |
554 | 552 | global $wgFlaggedRevsNamespaces, $wgFlaggedRevsProtection; |
555 | 553 | if ( $wgFlaggedRevsRCCrap ) { |
556 | | - # If patrolling is already on, then we know that it |
| 554 | + # If patrolling is already on, then we know that it |
557 | 555 | # was intended to have all namespaces patrollable. |
558 | 556 | if ( $wgUseRCPatrol ) { |
559 | 557 | global $wgFlaggedRevsPatrolNamespaces; |
— | — | @@ -565,6 +563,16 @@ |
566 | 564 | # Edits to reviewable pages must be flagged to be patrolled. |
567 | 565 | $wgUseRCPatrol = true; |
568 | 566 | } |
| 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 | + } |
569 | 577 | } |
570 | 578 | |
571 | 579 | # Conditional autopromote groups |