From: GeoffreyT2000 Date: Fri, 1 Mar 2019 03:47:38 +0000 (-0800) Subject: Update the change_tag table in rebuildrecentchanges.php X-Git-Tag: 1.34.2~6 X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e876fef4b07135a6005457c88a24d9e46e25d934 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) --- diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 9cbb5cd9c6..361203b962 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -170,6 +170,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(); } @@ -345,6 +354,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(); }