X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpTextPass.php;h=59a6b5178cb2367a189bf6358b4f9e499982a91c;hb=e9602b246640c4878036e1d27b7f71704ec4bf53;hp=fdc36c7bc1497b7eef96a0ed84c257f2fad35e9f;hpb=ad776c7d5f8deee581bf3338c76c6312c3e2933e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index fdc36c7bc1..59a6b5178c 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -28,6 +28,7 @@ require_once __DIR__ . '/backup.inc'; require_once __DIR__ . '/7zip.inc'; require_once __DIR__ . '/../includes/export/WikiExporter.php'; +use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\IMaintainableDatabase; /** @@ -218,7 +219,8 @@ TEXT // individually retrying at different layers of code. try { - $this->lb = wfGetLBFactory()->newMainLB(); + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); + $this->lb = $lbFactory->newMainLB(); } catch ( Exception $e ) { throw new MWException( __METHOD__ . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" ); @@ -722,13 +724,13 @@ TEXT } private function getTextSpawned( $id ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); if ( !$this->spawnProc ) { // First time? $this->openSpawn(); } $text = $this->getTextSpawnedOnce( $id ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); return $text; } @@ -774,7 +776,7 @@ TEXT } private function closeSpawn() { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); if ( $this->spawnRead ) { fclose( $this->spawnRead ); } @@ -791,7 +793,7 @@ TEXT pclose( $this->spawnProc ); } $this->spawnProc = false; - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } private function getTextSpawnedOnce( $id ) {