X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FattachLatest.php;h=4da09018c4c264bb0673a15919d83eb2be01d62d;hp=897972c75a6e2eda1963767b768462e6e4a3c228;hb=243a466018d24415de27815cfae995865c45a66a;hpb=e69bcfad17d67da5113cdd75276a5f7b5cefb123 diff --git a/maintenance/attachLatest.php b/maintenance/attachLatest.php index 897972c75a..4da09018c4 100644 --- a/maintenance/attachLatest.php +++ b/maintenance/attachLatest.php @@ -24,6 +24,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -53,6 +55,7 @@ class AttachLatest extends Maintenance { $conds, __METHOD__ ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $n = 0; foreach ( $result as $row ) { $pageId = intval( $row->page_id ); @@ -78,6 +81,7 @@ class AttachLatest extends Maintenance { if ( $this->hasOption( 'fix' ) ) { $page = WikiPage::factory( $title ); $page->updateRevisionOn( $dbw, $revision ); + $lbFactory->waitForReplication(); } $n++; }