Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -181,9 +181,6 @@ |
182 | 182 | # Let this stand alone just in case... |
183 | 183 | $wgGroupPermissions['reviewer']['review'] = true; |
184 | 184 | |
185 | | -$wgGroupPermissions['bot']['autoreview'] = true; |
186 | | -$wgGroupPermissions['bot']['autopatrolother'] = true; |
187 | | - |
188 | 185 | # Stable version selection and default page revision selection can be set per page. |
189 | 186 | $wgGroupPermissions['sysop']['stablesettings'] = true; |
190 | 187 | # Sysops can always move stable pages |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -675,7 +675,10 @@ |
676 | 676 | FlaggedRevs::autoReviewEdit( $article, $user, $rev->getText(), $rev, null, false ); |
677 | 677 | return true; |
678 | 678 | } |
679 | | - if( !$wgFlaggedRevsAutoReview || !$user->isAllowed('autoreview') ) |
| 679 | + # Auto-reviewing must be enabled |
| 680 | + if( !$wgFlaggedRevsAutoReview ) return true; |
| 681 | + # User must have the required permissions |
| 682 | + if( !$user->isAllowed('autoreview') && !$user->isAllowed('bot') ) |
680 | 683 | return true; |
681 | 684 | # If $baseRevId passed in, this is a null edit |
682 | 685 | $isNullEdit = $baseRevId ? true : false; |
— | — | @@ -751,7 +754,7 @@ |
752 | 755 | GAID_FOR_UPDATE ); |
753 | 756 | // Can this be patrolled? |
754 | 757 | } else if( FlaggedRevs::isPagePatrollable( $rc->getTitle() ) ) { |
755 | | - $patrol = $wgUser->isAllowed('autopatrolother'); |
| 758 | + $patrol = $wgUser->isAllowed('autopatrolother') || $wgUser->isAllowed('bot'); |
756 | 759 | $record = true; |
757 | 760 | } else { |
758 | 761 | global $wgUseNPPatrol; |
— | — | @@ -782,7 +785,7 @@ |
783 | 786 | # Grab current groups |
784 | 787 | $groups = $user->getGroups(); |
785 | 788 | # Do not give this to current holders or bots |
786 | | - if( in_array( 'bot', $groups ) || in_array( 'editor', $groups ) ) { |
| 789 | + if( $user->isAllowed('bot') || in_array('bot',$groups) || in_array('editor',$groups) ) { |
787 | 790 | wfProfileOut( __METHOD__ ); |
788 | 791 | return true; |
789 | 792 | } |