r84187 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84186‎ | r84187 | r84188 >
Date:18:02, 17 March 2011
Author:ialex
Status:ok
Tags:
Comment:
Be more consistent if updater script's output
Modified paths:
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -200,7 +200,7 @@
201201 } else {
202202 $this->output( "Fixing $field encoding on $table table... " );
203203 $this->applyPatch( $patchFile );
204 - $this->output( "ok\n" );
 204+ $this->output( "done.\n" );
205205 }
206206 }
207207
@@ -242,7 +242,7 @@
243243 $this->output( "ok\n" );
244244 $this->output( 'Adding default interwiki definitions...' );
245245 $this->applyPatch( "$IP/maintenance/interwiki.sql", true );
246 - $this->output( "ok\n" );
 246+ $this->output( "done.\n" );
247247 }
248248
249249 /**
@@ -257,7 +257,7 @@
258258
259259 $this->output( "Updating indexes to 20031107..." );
260260 $this->applyPatch( 'patch-indexes.sql', true );
261 - $this->output( "ok\n" );
 261+ $this->output( "done.\n" );
262262 }
263263
264264 protected function doOldLinksUpdate() {
@@ -275,7 +275,7 @@
276276 $this->output( "Fixing ancient broken imagelinks table.\n" );
277277 $this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this.\n" );
278278 $this->applyPatch( 'patch-fix-il_from.sql' );
279 - $this->output( "ok\n" );
 279+ $this->output( "done.\n" );
280280 }
281281
282282 /**
@@ -297,7 +297,7 @@
298298 'wl_title' => 'wl_title',
299299 'wl_notificationtimestamp' => 'wl_notificationtimestamp'
300300 ), array( 'NOT (wl_namespace & 1)' ), __METHOD__, 'IGNORE' );
301 - $this->output( "ok\n" );
 301+ $this->output( "done.\n" );
302302 }
303303
304304 function doSchemaRestructuring() {
@@ -486,7 +486,7 @@
487487 } else {
488488 $this->output( "Promoting $field from $info->Type to int... " );
489489 $this->db->query( "ALTER TABLE $tablename MODIFY $field int NOT NULL", __METHOD__ );
490 - $this->output( "ok\n" );
 490+ $this->output( "done.\n" );
491491 }
492492 }
493493 }
@@ -499,7 +499,7 @@
500500
501501 $this->output( "Converting links and brokenlinks tables to pagelinks... " );
502502 $this->applyPatch( 'patch-pagelinks.sql' );
503 - $this->output( "ok\n" );
 503+ $this->output( "done.\n" );
504504
505505 global $wgContLang;
506506 foreach ( MWNamespace::getCanonicalNamespaces() as $ns => $name ) {
@@ -521,7 +521,7 @@
522522 AND pl_title LIKE '$likeprefix:%'";
523523
524524 $this->db->query( $sql, __METHOD__ );
525 - $this->output( "ok\n" );
 525+ $this->output( "done.\n" );
526526 }
527527 }
528528
@@ -537,7 +537,7 @@
538538 }
539539 $this->output( "Adding unique index on user_name... " );
540540 $this->applyPatch( 'patch-user_nameindex.sql' );
541 - $this->output( "ok\n" );
 541+ $this->output( "done.\n" );
542542 }
543543
544544 protected function doUserGroupsUpdate() {
@@ -600,7 +600,7 @@
601601 __METHOD__ );
602602 }
603603 }
604 - $this->output( "ok\n" );
 604+ $this->output( "done.\n" );
605605 }
606606
607607 /**
@@ -616,7 +616,7 @@
617617
618618 $this->output( "Making wl_notificationtimestamp nullable... " );
619619 $this->applyPatch( 'patch-watchlist-null.sql' );
620 - $this->output( "ok\n" );
 620+ $this->output( "done.\n" );
621621 }
622622
623623 /**
@@ -703,7 +703,7 @@
704704 $this->output( "Creating page_restrictions table..." );
705705 $this->applyPatch( 'patch-page_restrictions.sql' );
706706 $this->applyPatch( 'patch-page_restrictions_sortkey.sql' );
707 - $this->output( "ok\n" );
 707+ $this->output( "done.\n" );
708708
709709 $this->output( "Migrating old restrictions to new table...\n" );
710710 $task = $this->maintenance->runChild( 'UpdateRestrictions' );
@@ -752,15 +752,16 @@
753753 } else {
754754 $this->output( "Adding pf_memory field to table profiling..." );
755755 $this->applyPatch( 'patch-profiling-memory.sql' );
756 - $this->output( "ok\n" );
 756+ $this->output( "done.\n" );
757757 }
758758 }
759759
760760 protected function doFilearchiveIndicesUpdate() {
761761 $info = $this->db->indexInfo( 'filearchive', 'fa_user_timestamp', __METHOD__ );
762762 if ( !$info ) {
 763+ $this->output( "Updating filearchive indices..." );
763764 $this->applyPatch( 'patch-filearchive-user-index.sql' );
764 - $this->output( "...filearchive indices updated\n" );
 765+ $this->output( "done.\n" );
765766 }
766767 }
767768
@@ -773,7 +774,7 @@
774775
775776 $this->output( "Making pl_namespace, tl_namespace and il_to indices UNIQUE... " );
776777 $this->applyPatch( 'patch-pl-tl-il-unique.sql' );
777 - $this->output( "ok\n" );
 778+ $this->output( "done.\n" );
778779 }
779780
780781 protected function renameEuWikiId() {
@@ -784,7 +785,7 @@
785786
786787 $this->output( "Renaming eu_wiki_id -> eu_local_id... " );
787788 $this->applyPatch( 'patch-eu_local_id.sql' );
788 - $this->output( "ok\n" );
 789+ $this->output( "done.\n" );
789790 }
790791
791792 protected function doUpdateMimeMinorField() {
@@ -795,7 +796,7 @@
796797
797798 $this->output( "Altering all *_mime_minor fields to 100 bytes in size ... " );
798799 $this->applyPatch( 'patch-mime_minor_length.sql' );
799 - $this->output( "ok\n" );
 800+ $this->output( "done.\n" );
800801 }
801802
802803 protected function doPopulateRevLen() {

Status & tagging log