From: GeoffreyT2000 Date: Fri, 28 Jul 2017 01:44:21 +0000 (-0700) Subject: Don't generate RC entries for filterable log types X-Git-Tag: 1.34.0-rc.0~4579^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=6c281918ca2f0caefb7964f0deb2ed7a4118eb37;p=lhc%2Fweb%2Fwiklou.git Don't generate RC entries for filterable log types This change is needed so that filterable log types (e.g. patrol) will not get corresponding recent changes entries after running rebuildrecentchanges.php. Creation log entries will not get an RC entry regenerated either. Bug: T20364 Change-Id: Id18364599b44d16f867f1042e1dc7e8f51b1b369 --- diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index d86c8ed0f2..471c7aedd7 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -269,10 +269,13 @@ class RebuildRecentchanges extends Maintenance { * Rebuild pass 3: Insert `recentchanges` entries for action logs. */ private function rebuildRecentChangesTablePass3( ILBFactory $lbFactory ) { - global $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( LogPage::validTypes(), 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' ],