diff options
author | Brian Evans <grknight@gentoo.org> | 2020-10-02 15:24:06 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2020-10-02 15:24:06 -0400 |
commit | 60dd5fd95847643eab04ce173f0774c9c584e795 (patch) | |
tree | 52299ac4e3c5c69df75997bfd7d62b71ef9e0089 /MLEB/UniversalLanguageSelector/maintenance | |
parent | Update Widgets to 1.35 (diff) | |
download | extensions-60dd5fd95847643eab04ce173f0774c9c584e795.tar.gz extensions-60dd5fd95847643eab04ce173f0774c9c584e795.tar.bz2 extensions-60dd5fd95847643eab04ce173f0774c9c584e795.zip |
Update MLEB to 2020.07
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/UniversalLanguageSelector/maintenance')
-rw-r--r-- | MLEB/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/MLEB/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php b/MLEB/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php index 00d4ed48..ef569f26 100644 --- a/MLEB/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php +++ b/MLEB/UniversalLanguageSelector/maintenance/ULSCompactLinksDisablePref.php @@ -13,6 +13,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php' : __DIR__ . '/../../../maintenance/Maintenance.php'; @@ -21,8 +23,8 @@ class ULSCompactLinksDisablePref extends Maintenance { public function __construct() { parent::__construct(); $this->requireExtension( 'UniversalLanguageSelector' ); - $this->mDescription = 'Disables the UniversalLanguageSelector compact-language-links ' . - 'preference for appropriate users.'; + $this->addDescription( 'Disables the UniversalLanguageSelector compact-language-links ' . + 'preference for appropriate users.' ); $this->setBatchSize( 100 ); $this->addOption( 'really', 'Really change the preferences' ); @@ -32,6 +34,7 @@ class ULSCompactLinksDisablePref extends Maintenance { public function execute() { $dbr = wfGetDB( DB_REPLICA, 'vslow' ); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $really = $this->hasOption( 'really' ); @@ -110,12 +113,12 @@ class ULSCompactLinksDisablePref extends Maintenance { } $this->output( "Disabled compact-language-links for $disabled users.\n" ); - wfWaitForSlaves(); + $lbFactory->waitForReplication(); } while ( $results->numRows() === $this->mBatchSize ); $this->output( "done.\n" ); } } -$maintClass = "ULSCompactLinksDisablePref"; +$maintClass = ULSCompactLinksDisablePref::class; require_once RUN_MAINTENANCE_IF_MAIN; |