Merge "docs: Fix Doxygen parsing of @var descriptions with $var names"
[lhc/web/wiklou.git] / maintenance / migrateArchiveText.php
index b2b14cb..2271c39 100644 (file)
@@ -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 .= ',';
                                                        }