Merge "Remove deprecated variable usage from Maintenance.php"
[lhc/web/wiklou.git] / maintenance / rebuildrecentchanges.php
index a259484..471c7ae 100644 (file)
@@ -269,10 +269,13 @@ class RebuildRecentchanges extends Maintenance {
         * Rebuild pass 3: Insert `recentchanges` entries for action logs.
         */
        private function rebuildRecentChangesTablePass3( ILBFactory $lbFactory ) {
-               global $wgLogTypes, $wgLogRestrictions;
+               global $wgLogRestrictions, $wgFilterLogTypes;
 
                $dbw = $this->getDB( DB_MASTER );
                $commentStore = CommentStore::getStore();
+               $nonRCLogs = array_merge( array_keys( $wgLogRestrictions ),
+                       array_keys( $wgFilterLogTypes ),
+                       [ 'create' ] );
 
                $this->output( "Loading from user, page, and logging tables...\n" );
 
@@ -294,9 +297,8 @@ class RebuildRecentchanges extends Maintenance {
                        [
                                'log_timestamp > ' . $dbw->addQuotes( $dbw->timestamp( $this->cutoffFrom ) ),
                                'log_timestamp < ' . $dbw->addQuotes( $dbw->timestamp( $this->cutoffTo ) ),
-                               // Some logs don't go in RC since they are private.
-                               // @FIXME: core/extensions also have spammy logs that don't go in RC.
-                               'log_type' => array_diff( $wgLogTypes, array_keys( $wgLogRestrictions ) ),
+                               // Some logs don't go in RC since they are private, or are included in the filterable log types.
+                               'log_type' => array_diff( LogPage::validTypes(), $nonRCLogs ),
                        ],
                        __METHOD__,
                        [ 'ORDER BY' => 'log_timestamp DESC' ],