dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Move ApiQueryUserInfo::getBlockInfo() to ApiBase"
[lhc/web/wiklou.git]
/
maintenance
/
attachLatest.php
diff --git
a/maintenance/attachLatest.php
b/maintenance/attachLatest.php
index
36060d8
..
4da0901
100644
(file)
--- a/
maintenance/attachLatest.php
+++ b/
maintenance/attachLatest.php
@@
-24,6
+24,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-53,6
+55,7
@@
class AttachLatest extends Maintenance {
$conds,
__METHOD__ );
$conds,
__METHOD__ );
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$n = 0;
foreach ( $result as $row ) {
$pageId = intval( $row->page_id );
$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 );
if ( $this->hasOption( 'fix' ) ) {
$page = WikiPage::factory( $title );
$page->updateRevisionOn( $dbw, $revision );
+ $lbFactory->waitForReplication();
}
$n++;
}
}
$n++;
}
@@
-88,5
+92,5
@@
class AttachLatest extends Maintenance {
}
}
}
}
-$maintClass =
"AttachLatest"
;
+$maintClass =
AttachLatest::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;