dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maintenance: Avoid usage of deprecated Revision::* constants
[lhc/web/wiklou.git]
/
maintenance
/
storage
/
checkStorage.php
diff --git
a/maintenance/storage/checkStorage.php
b/maintenance/storage/checkStorage.php
index
173d741
..
d8a8808
100644
(file)
--- a/
maintenance/storage/checkStorage.php
+++ b/
maintenance/storage/checkStorage.php
@@
-22,6
+22,7
@@
*/
use MediaWiki\MediaWikiServices;
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Shell\Shell;
if ( !defined( 'MEDIAWIKI' ) ) {
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;
class CheckStorage {
const CONCAT_HEADER = 'O:27:"concatenatedgziphistoryblob"';
public $oldIdMap, $errors;
+ /** @var ExternalStoreDB */
public $dbStore = null;
public $errorDescriptions = [
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 ) ) {
// 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 );
}
foreach ( $externalConcatBlobs as $cluster => $xBlobIds ) {
$blobIds = array_keys( $xBlobIds );
@@
-422,7
+425,8
@@
class CheckStorage {
}
if ( is_null( $this->dbStore ) ) {
}
if ( is_null( $this->dbStore ) ) {
- $this->dbStore = new ExternalStoreDB;
+ $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
+ $this->dbStore = $esFactory->getStore( 'DB' );
}
foreach ( $externalConcatBlobs as $cluster => $oldIds ) {
}
foreach ( $externalConcatBlobs as $cluster => $oldIds ) {
@@
-520,7
+524,7
@@
class CheckStorage {
function importRevision( &$revision, &$importer ) {
$id = $revision->getID();
function importRevision( &$revision, &$importer ) {
$id = $revision->getID();
- $content = $revision->getContent( Revision::RAW );
+ $content = $revision->getContent( Revision
Record
::RAW );
$id = $id ?: '';
if ( $content === null ) {
$id = $id ?: '';
if ( $content === null ) {