Be more consistent if updater script's output
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 17 Mar 2011 18:02:37 +0000 (18:02 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 17 Mar 2011 18:02:37 +0000 (18:02 +0000)
includes/installer/MysqlUpdater.php

index f33983a..f3881a5 100644 (file)
@@ -200,7 +200,7 @@ class MysqlUpdater extends DatabaseUpdater {
                } else {
                        $this->output( "Fixing $field encoding on $table table... " );
                        $this->applyPatch( $patchFile );
-                       $this->output( "ok\n" );
+                       $this->output( "done.\n" );
                }
        }
 
@@ -242,7 +242,7 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->output( "ok\n" );
                $this->output( 'Adding default interwiki definitions...' );
                $this->applyPatch( "$IP/maintenance/interwiki.sql", true );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        /**
@@ -257,7 +257,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Updating indexes to 20031107..." );
                $this->applyPatch( 'patch-indexes.sql', true );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        protected function doOldLinksUpdate() {
@@ -275,7 +275,7 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->output( "Fixing ancient broken imagelinks table.\n" );
                $this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this.\n" );
                $this->applyPatch( 'patch-fix-il_from.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        /**
@@ -297,7 +297,7 @@ class MysqlUpdater extends DatabaseUpdater {
                                'wl_title' => 'wl_title',
                                'wl_notificationtimestamp' => 'wl_notificationtimestamp'
                        ), array( 'NOT (wl_namespace & 1)' ), __METHOD__, 'IGNORE' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        function doSchemaRestructuring() {
@@ -486,7 +486,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        } else {
                                $this->output( "Promoting $field from $info->Type to int... " );
                                $this->db->query( "ALTER TABLE $tablename MODIFY $field int NOT NULL", __METHOD__ );
-                               $this->output( "ok\n" );
+                               $this->output( "done.\n" );
                        }
                }
        }
@@ -499,7 +499,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Converting links and brokenlinks tables to pagelinks... " );
                $this->applyPatch( 'patch-pagelinks.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
 
                global $wgContLang;
                foreach ( MWNamespace::getCanonicalNamespaces() as $ns => $name ) {
@@ -521,7 +521,7 @@ class MysqlUpdater extends DatabaseUpdater {
                                           AND pl_title LIKE '$likeprefix:%'";
 
                        $this->db->query( $sql, __METHOD__ );
-                       $this->output( "ok\n" );
+                       $this->output( "done.\n" );
                }
        }
 
@@ -537,7 +537,7 @@ class MysqlUpdater extends DatabaseUpdater {
                }
                $this->output( "Adding unique index on user_name... " );
                $this->applyPatch( 'patch-user_nameindex.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        protected function doUserGroupsUpdate() {
@@ -600,7 +600,7 @@ class MysqlUpdater extends DatabaseUpdater {
                                        __METHOD__ );
                        }
                }
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        /**
@@ -616,7 +616,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Making wl_notificationtimestamp nullable... " );
                $this->applyPatch( 'patch-watchlist-null.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        /**
@@ -703,7 +703,7 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->output( "Creating page_restrictions table..." );
                $this->applyPatch( 'patch-page_restrictions.sql' );
                $this->applyPatch( 'patch-page_restrictions_sortkey.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
 
                $this->output( "Migrating old restrictions to new table...\n" );
                $task = $this->maintenance->runChild( 'UpdateRestrictions' );
@@ -752,15 +752,16 @@ class MysqlUpdater extends DatabaseUpdater {
                } else {
                        $this->output( "Adding pf_memory field to table profiling..." );
                        $this->applyPatch( 'patch-profiling-memory.sql' );
-                       $this->output( "ok\n" );
+                       $this->output( "done.\n" );
                }
        }
 
        protected function doFilearchiveIndicesUpdate() {
                $info = $this->db->indexInfo( 'filearchive', 'fa_user_timestamp', __METHOD__ );
                if ( !$info ) {
+                       $this->output( "Updating filearchive indices..." );
                        $this->applyPatch( 'patch-filearchive-user-index.sql' );
-                       $this->output( "...filearchive indices updated\n" );
+                       $this->output( "done.\n" );
                }
        }
 
@@ -773,7 +774,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Making pl_namespace, tl_namespace and il_to indices UNIQUE... " );
                $this->applyPatch( 'patch-pl-tl-il-unique.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        protected function renameEuWikiId() {
@@ -784,7 +785,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Renaming eu_wiki_id -> eu_local_id... " );
                $this->applyPatch( 'patch-eu_local_id.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        protected function doUpdateMimeMinorField() {
@@ -795,7 +796,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                $this->output( "Altering all *_mime_minor fields to 100 bytes in size ... " );
                $this->applyPatch( 'patch-mime_minor_length.sql' );
-               $this->output( "ok\n" );
+               $this->output( "done.\n" );
        }
 
        protected function doPopulateRevLen() {