Merge "Remove special collation for Northern Sami"
[lhc/web/wiklou.git] / maintenance / dumpTextPass.php
index 57e09a7..95dd4da 100644 (file)
@@ -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;
 
 /**
@@ -99,7 +100,7 @@ class TextPassDumper extends BackupDumper {
        protected $db;
 
        /**
-        * @param array $args For backward compatibility
+        * @param array|null $args For backward compatibility
         */
        function __construct( $args = null ) {
                parent::__construct();
@@ -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() . ")" );