jenkins-bot has submitted this change and it was merged.

Change subject: Fix IDEA warnings in CloneDatabase
......................................................................


Fix IDEA warnings in CloneDatabase

Change-Id: I45231237dd49dfdd8158a68d8f63d769b762f19c
---
M includes/db/CloneDatabase.php
1 file changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php
index 2af742e..f1ccd2a 100644
--- a/includes/db/CloneDatabase.php
+++ b/includes/db/CloneDatabase.php
@@ -23,6 +23,7 @@
  * @file
  * @ingroup Database
  */
+use MediaWiki\MediaWikiServices;
 
 class CloneDatabase {
        /** @var string Table prefix for cloning */
@@ -40,16 +41,19 @@
        /** @var bool Whether to use temporary tables or not */
        private $useTemporaryTables = true;
 
+       /** @var Database */
+       private $db;
+
        /**
         * Constructor
         *
-        * @param IDatabase $db A database subclass
+        * @param Database $db A database subclass
         * @param array $tablesToClone An array of tables to clone, unprefixed
         * @param string $newTablePrefix Prefix to assign to the tables
         * @param string $oldTablePrefix Prefix on current tables, if not 
$wgDBprefix
         * @param bool $dropCurrentTables
         */
-       public function __construct( IDatabase $db, array $tablesToClone,
+       public function __construct( Database $db, array $tablesToClone,
                $newTablePrefix, $oldTablePrefix = '', $dropCurrentTables = true
        ) {
                $this->db = $db;
@@ -130,7 +134,7 @@
        public static function changePrefix( $prefix ) {
                global $wgDBprefix;
 
-               $lbFactory = wfGetLBFactory();
+               $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                $lbFactory->setDomainPrefix( $prefix );
                $wgDBprefix = $prefix;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/312056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I45231237dd49dfdd8158a68d8f63d769b762f19c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to