*Check $wgUseRCPatrol to avoid possible expensive query if likely not needed
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 22 May 2007 16:49:40 +0000 (16:49 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 22 May 2007 16:49:40 +0000 (16:49 +0000)
maintenance/rebuildrecentchanges.inc

index e00c191..2cad0fe 100644 (file)
@@ -92,7 +92,7 @@ function rebuildRecentChangesTablePass2()
 
 function rebuildRecentChangesTablePass3()
 {
-       global $wgGroupPermissions;
+       global $wgGroupPermissions, $wgUseRCPatrol;
                        
        $dbw = wfGetDB( DB_MASTER );
        
@@ -103,7 +103,7 @@ function rebuildRecentChangesTablePass3()
                if( isset( $rights['bot'] ) && $rights['bot'] == true ) {
                        $botgroups[] = "'" . $dbw->strencode( $group ) . "'";
                }
-               if( isset( $rights['autopatrol'] ) && $rights['autopatrol'] == true ) {
+               if( $wgUseRCPatrol && isset( $rights['autopatrol'] ) && $rights['autopatrol'] == true ) {
                        $autopatrolgroups[] = "'" . $dbw->strencode( $group ) . "'";
                }
        }