summaryrefslogtreecommitdiff
path: root/maintenance/rebuildrecentchanges.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /maintenance/rebuildrecentchanges.php
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'maintenance/rebuildrecentchanges.php')
-rw-r--r--maintenance/rebuildrecentchanges.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php
index 0278f72c..bfaaab54 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -218,24 +218,17 @@ class RebuildRecentchanges extends Maintenance {
* DOCUMENT ME!
*/
private function rebuildRecentChangesTablePass4() {
- global $wgGroupPermissions, $wgUseRCPatrol;
+ global $wgUseRCPatrol;
$dbw = wfGetDB( DB_MASTER );
list( $recentchanges, $usergroups, $user ) = $dbw->tableNamesN( 'recentchanges', 'user_groups', 'user' );
- $botgroups = $autopatrolgroups = array();
- foreach ( $wgGroupPermissions as $group => $rights ) {
- if ( isset( $rights['bot'] ) && $rights['bot'] ) {
- $botgroups[] = $dbw->addQuotes( $group );
- }
- if ( $wgUseRCPatrol && isset( $rights['autopatrol'] ) && $rights['autopatrol'] ) {
- $autopatrolgroups[] = $dbw->addQuotes( $group );
- }
- }
+ $botgroups = User::getGroupsWithPermission( 'bot' );
+ $autopatrolgroups = $wgUseRCPatrol ? User::getGroupsWithPermission( 'autopatrol' ) : array();
# Flag our recent bot edits
if ( !empty( $botgroups ) ) {
- $botwhere = implode( ',', $botgroups );
+ $botwhere = $dbw->makeList( $botgroups );
$botusers = array();
$this->output( "Flagging bot account edits...\n" );
@@ -259,7 +252,7 @@ class RebuildRecentchanges extends Maintenance {
global $wgMiserMode;
# Flag our recent autopatrolled edits
if ( !$wgMiserMode && !empty( $autopatrolgroups ) ) {
- $patrolwhere = implode( ',', $autopatrolgroups );
+ $patrolwhere = $dbw->makeList( $autopatrolgroups );
$patrolusers = array();
$this->output( "Flagging auto-patrolled edits...\n" );