X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=maintenance%2Fstorage%2FcheckStorage.php;h=d8a8808cc34b46173033667187e94ceb2c7bfff0;hb=e16eec8cafd0586be01aa4f0c38c7fb23f96a331;hp=173d741be86f48900efff7478a4058cd67f50c15;hpb=284778405b0e41c57b3085958401e07b6ca742e6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 173d741be8..d8a8808cc3 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -22,6 +22,7 @@ */ use MediaWiki\MediaWikiServices; +use MediaWiki\Revision\RevisionRecord; use MediaWiki\Shell\Shell; if ( !defined( 'MEDIAWIKI' ) ) { @@ -45,6 +46,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { class CheckStorage { const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"'; public $oldIdMap, $errors; + /** @var ExternalStoreDB */ public $dbStore = null; public $errorDescriptions = [ @@ -223,7 +225,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 +425,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 ) { @@ -520,7 +524,7 @@ class CheckStorage { function importRevision( &$revision, &$importer ) { $id = $revision->getID(); - $content = $revision->getContent( Revision::RAW ); + $content = $revision->getContent( RevisionRecord::RAW ); $id = $id ?: ''; if ( $content === null ) {