Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / maintenance / storage / checkStorage.php
index 173d741..c2fa687 100644 (file)
@@ -45,6 +45,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 class CheckStorage {
        const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"';
        public $oldIdMap, $errors;
+       /** @var ExternalStoreDB */
        public $dbStore = null;
 
        public $errorDescriptions = [
@@ -223,7 +224,8 @@ class CheckStorage {
                        // Check external normal blobs for existence
                        if ( count( $externalNormalBlobs ) ) {
                                if ( is_null( $this->dbStore ) ) {
-                                       $this->dbStore = new ExternalStoreDB;
+                                       $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
+                                       $this->dbStore = $esFactory->getStore( 'DB' );
                                }
                                foreach ( $externalConcatBlobs as $cluster => $xBlobIds ) {
                                        $blobIds = array_keys( $xBlobIds );
@@ -422,7 +424,8 @@ class CheckStorage {
                }
 
                if ( is_null( $this->dbStore ) ) {
-                       $this->dbStore = new ExternalStoreDB;
+                       $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
+                       $this->dbStore = $esFactory->getStore( 'DB' );
                }
 
                foreach ( $externalConcatBlobs as $cluster => $oldIds ) {