Update OOUI to v0.29.5
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index 82ccce2..f5d01d6 100644 (file)
@@ -164,10 +164,7 @@ abstract class DatabaseUpdater {
 
                // This will automatically add "AutoloadClasses" to $wgAutoloadClasses
                $data = $registry->readFromQueue( $queue );
-               $hooks = [];
-               if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
-                       $hooks = $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'];
-               }
+               $hooks = $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ?? [];
                if ( $vars && isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
                        $hooks = array_merge_recursive( $hooks, $vars['wgHooks']['LoadExtensionSchemaUpdates'] );
                }
@@ -1278,13 +1275,29 @@ abstract class DatabaseUpdater {
                }
        }
 
+       /**
+        * Merge `image_comment_temp` into the `image` table
+        * @since 1.32
+        */
+       protected function migrateImageCommentTemp() {
+               global $wgCommentTableSchemaMigrationStage;
+               if ( $wgCommentTableSchemaMigrationStage > MIGRATION_OLD ) {
+                       $this->output( "Merging image_comment_temp into the image table\n" );
+                       $task = $this->maintenance->runChild(
+                               MigrateImageCommentTemp::class, 'migrateImageCommentTemp.php'
+                       );
+                       $ok = $task->execute();
+                       $this->output( $ok ? "done.\n" : "errors were encountered.\n" );
+               }
+       }
+
        /**
         * Migrate actors to the new 'actor' table
         * @since 1.31
         */
        protected function migrateActors() {
                global $wgActorTableSchemaMigrationStage;
-               if ( $wgActorTableSchemaMigrationStage >= MIGRATION_WRITE_NEW &&
+               if ( ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) &&
                        !$this->updateRowExists( 'MigrateActors' )
                ) {
                        $this->output(