X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=maintenance%2FdumpTextPass.php;h=95dd4dab39425178dfe9b128ddd5f923a471d851;hb=130ec2523df12a3ca2fe0d422163696d09fcea08;hp=57e09a71aeef0fd40a1a57b9e178fbb2a531ab24;hpb=bed43f525501ddf80995daa8e406414500ce3d1d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 57e09a71ae..95dd4dab39 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; /** @@ -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() . ")" );