*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Shell\Shell;
if ( !defined( 'MEDIAWIKI' ) ) {
class CheckStorage {
const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"';
public $oldIdMap, $errors;
+ /** @var ExternalStoreDB */
public $dbStore = null;
public $errorDescriptions = [
[],
[ 'content' => [ 'INNER JOIN', [ 'content_id = slot_content_id' ] ] ]
);
+ /** @var \MediaWiki\Storage\SqlBlobStore $blobStore */
$blobStore = MediaWikiServices::getInstance()->getBlobStore();
+ '@phan-var \MediaWiki\Storage\SqlBlobStore $blobStore';
foreach ( $res as $row ) {
$textId = $blobStore->getTextIdFromAddress( $row->content_address );
if ( $textId ) {
// 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 );
}
if ( is_null( $this->dbStore ) ) {
- $this->dbStore = new ExternalStoreDB;
+ $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
+ $this->dbStore = $esFactory->getStore( 'DB' );
}
foreach ( $externalConcatBlobs as $cluster => $oldIds ) {
function importRevision( &$revision, &$importer ) {
$id = $revision->getID();
- $content = $revision->getContent( Revision::RAW );
+ $content = $revision->getContent( RevisionRecord::RAW );
$id = $id ?: '';
if ( $content === null ) {