replace wfGetDB (discouraged for use) with Maintenance::getDB in dumps scripts
authorAriel T. Glenn <ariel@wikimedia.org>
Thu, 8 Aug 2019 13:11:36 +0000 (16:11 +0300)
committerAriel T. Glenn <ariel@wikimedia.org>
Wed, 21 Aug 2019 10:01:47 +0000 (13:01 +0300)
Bug: T228772
Change-Id: I0d9448b2565481f61d927b2d58f44bddbf358ed8

maintenance/includes/BackupDumper.php

index 08eade9..358dc21 100644 (file)
@@ -316,7 +316,7 @@ abstract class BackupDumper extends Maintenance {
 
                $dbr = $this->forcedDb;
                if ( $this->forcedDb === null ) {
-                       $dbr = wfGetDB( DB_REPLICA );
+                       $dbr = $this->getDB( DB_REPLICA );
                }
                $this->maxCount = $dbr->selectField( $table, "MAX($field)", '', __METHOD__ );
                $this->startTime = microtime( true );