Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -160,8 +160,7 @@ |
161 | 161 | |
162 | 162 | # Lets some users access the review UI and set some flags |
163 | 163 | $wgAvailableRights[] = 'review'; |
164 | | -# Let some users set higher settings |
165 | | -$wgAvailableRights[] = 'validate'; |
| 164 | +$wgAvailableRights[] = 'validate'; # Let some users set higher settings |
166 | 165 | $wgAvailableRights[] = 'autoreview'; |
167 | 166 | $wgAvailableRights[] = 'patrolmarks'; |
168 | 167 | $wgAvailableRights[] = 'autopatrolother'; |
— | — | @@ -180,6 +179,8 @@ |
181 | 180 | # Let this stand alone just in case... |
182 | 181 | $wgGroupPermissions['reviewer']['review'] = true; |
183 | 182 | |
| 183 | +# Sysops have their edits autoreviewed |
| 184 | +$wgGroupPermissions['sysop']['autoreview'] = true; |
184 | 185 | # Stable version selection and default page revision selection can be set per page. |
185 | 186 | $wgGroupPermissions['sysop']['stablesettings'] = true; |
186 | 187 | # Sysops can always move stable pages |
— | — | @@ -189,7 +190,10 @@ |
190 | 191 | # namespaces autopatrolled. |
191 | 192 | $wgGroupPermissions['autoconfirmed']['autopatrolother'] = true; |
192 | 193 | |
193 | | -# Define when users get automatically promoted to editors. Set as false to disable. |
| 194 | +# Implicit autoreview group |
| 195 | +$wgGroupPermissions['autoreview']['autoreview'] = true; |
| 196 | + |
| 197 | +# Define when users get automatically promoted to Editors. Set as false to disable. |
194 | 198 | # 'spacing' and 'benchmarks' require edits to be spread out. Users must have X (benchmark) |
195 | 199 | # edits Y (spacing) days apart. |
196 | 200 | $wgFlaggedRevsAutopromote = array( |
— | — | @@ -462,6 +466,15 @@ |
463 | 467 | global $wgHooks; |
464 | 468 | $wgHooks['userCan'][] = 'FlaggedRevsHooks::userCanView'; |
465 | 469 | } |
| 470 | + # Grant implicit autoreview rights to some users. |
| 471 | + # This will include older users that choose not to be Editors. |
| 472 | + global $wgAutopromote, $wgFlaggedRevsAutopromote; |
| 473 | + $wgAutopromote['autoreview'] = array( '&', |
| 474 | + array( APCOND_EDITCOUNT, max($wgFlaggedRevsAutopromote['edits'],3000) ), |
| 475 | + array( APCOND_AGE, max($wgFlaggedRevsAutopromote['days'],120)*24*3600 ), |
| 476 | + array( APCOND_AGE_FROM_EDIT, max($wgFlaggedRevsAutopromote['days'],120)*24*3600 ), |
| 477 | + array( APCOND_EMAILCONFIRMED, true ) |
| 478 | + ); |
466 | 479 | } |
467 | 480 | |
468 | 481 | /* |