From a9beb409f957bec65b8fced623e9aa3d7b7c65a9 Mon Sep 17 00:00:00 2001 From: GeoffreyT2000 Date: Thu, 28 Feb 2019 19:47:38 -0800 Subject: [PATCH] Update the change_tag table in rebuildrecentchanges.php Without updating the change_tag table, tags will not correctly appear on Special:RecentChanges after running the script. Bug: T229461 Change-Id: Iff12588df1ad8d658091832e38d870dd8b75a32f (cherry picked from commit 4c69162b95afc3dd3d7a1fa51cee207e6fe0171b) --- maintenance/rebuildrecentchanges.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 9c2549fc38..03ab64e313 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -168,6 +168,15 @@ class RebuildRecentchanges extends Maintenance { + $actorMigration->getInsertValues( $dbw, 'rc_user', $user ), __METHOD__ ); + + $rcid = $dbw->insertId(); + $dbw->update( + 'change_tag', + [ 'ct_rc_id' => $rcid ], + [ 'ct_rev_id' => $row->rev_id ], + __METHOD__ + ); + if ( ( ++$inserted % $this->getBatchSize() ) == 0 ) { $lbFactory->waitForReplication(); } @@ -340,6 +349,14 @@ class RebuildRecentchanges extends Maintenance { __METHOD__ ); + $rcid = $dbw->insertId(); + $dbw->update( + 'change_tag', + [ 'ct_rc_id' => $rcid ], + [ 'ct_log_id' => $row->log_id ], + __METHOD__ + ); + if ( ( ++$inserted % $this->getBatchSize() ) == 0 ) { $lbFactory->waitForReplication(); } -- 2.20.1