X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FmigrateArchiveText.php;h=2271c393a8671a81a099ea94be0c8d13dfba6b7d;hb=853838a322610efa01db0917b76e0aeac65e68ba;hp=b2b14cbdc4c389e153c2eed34f379e3611a712a2;hpb=4077b57759756ecd0d25427ec9598feb28a28ac1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/migrateArchiveText.php b/maintenance/migrateArchiveText.php index b2b14cbdc4..2271c393a8 100644 --- a/maintenance/migrateArchiveText.php +++ b/maintenance/migrateArchiveText.php @@ -55,9 +55,8 @@ class MigrateArchiveText extends LoggedUpdateMaintenance { } protected function doDBUpdates() { - global $wgDefaultExternalStore; - $replaceMissing = $this->hasOption( 'replace-missing' ); + $defaultExternalStore = $this->getConfig()->get( 'DefaultExternalStore' ); $batchSize = $this->getBatchSize(); $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); @@ -96,11 +95,8 @@ class MigrateArchiveText extends LoggedUpdateMaintenance { if ( $data !== false ) { $flags = Revision::compressRevisionText( $data ); - if ( $wgDefaultExternalStore ) { + if ( $defaultExternalStore ) { $data = ExternalStore::insertToDefault( $data ); - if ( !$data ) { - throw new MWException( "Unable to store text to external storage" ); - } if ( $flags ) { $flags .= ','; }