Merge "Reword 'right-purge'"
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index 43000b8..750f108 100644 (file)
@@ -410,9 +410,7 @@ abstract class DatabaseUpdater {
                $this->updatesSkipped = [];
 
                foreach ( $updates as $funcList ) {
-                       $func = $funcList[0];
-                       $args = $funcList[1];
-                       $origParams = $funcList[2];
+                       list( $func, $args, $origParams ) = $funcList;
                        $func( ...$args );
                        flush();
                        $this->updatesSkipped[] = $origParams;
@@ -1074,7 +1072,9 @@ abstract class DatabaseUpdater {
                }
 
                // ResourceLoader: Message cache
-               $blobStore = new MessageBlobStore();
+               $blobStore = new MessageBlobStore(
+                       MediaWikiServices::getInstance()->getResourceLoader()
+               );
                $blobStore->clear();
 
                // ResourceLoader: File-dependency cache
@@ -1261,10 +1261,7 @@ abstract class DatabaseUpdater {
         * @since 1.30
         */
        protected function migrateComments() {
-               global $wgCommentTableSchemaMigrationStage;
-               if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_NEW &&
-                       !$this->updateRowExists( 'MigrateComments' )
-               ) {
+               if ( !$this->updateRowExists( 'MigrateComments' ) ) {
                        $this->output(
                                "Migrating comments to the 'comments' table, printing progress markers. For large\n" .
                                "databases, you may want to hit Ctrl-C and do this manually with\n" .
@@ -1281,20 +1278,14 @@ abstract class DatabaseUpdater {
         * @since 1.32
         */
        protected function migrateImageCommentTemp() {
-               global $wgCommentTableSchemaMigrationStage;
-
                if ( $this->tableExists( 'image_comment_temp' ) ) {
-                       if ( $wgCommentTableSchemaMigrationStage > MIGRATION_OLD ) {
-                               $this->output( "Merging image_comment_temp into the image table\n" );
-                               $task = $this->maintenance->runChild(
-                                       MigrateImageCommentTemp::class, 'migrateImageCommentTemp.php'
-                               );
-                               $task->setForce();
-                               $ok = $task->execute();
-                               $this->output( $ok ? "done.\n" : "errors were encountered.\n" );
-                       } else {
-                               $ok = true;
-                       }
+                       $this->output( "Merging image_comment_temp into the image table\n" );
+                       $task = $this->maintenance->runChild(
+                               MigrateImageCommentTemp::class, 'migrateImageCommentTemp.php'
+                       );
+                       $task->setForce();
+                       $ok = $task->execute();
+                       $this->output( $ok ? "done.\n" : "errors were encountered.\n" );
                        if ( $ok ) {
                                $this->dropTable( 'image_comment_temp' );
                        }