r101897 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101896‎ | r101897 | r101898 >
Date:22:29, 3 November 2011
Author:reedy
Status:ok
Tags:
Comment:
REL1_18 MFT r101449, r101450, r101454
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/OracleUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/includes/installer/SqliteUpdater.php (modified) (history)
  • /branches/REL1_18/phase3/maintenance/rebuildLocalisationCache.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/maintenance/rebuildLocalisationCache.php
@@ -112,9 +112,9 @@
113113 * Helper function to rebuild list of languages codes. Prints the code
114114 * for each language which is rebuilt.
115115 * @param $codes list List of language codes to rebuild.
116 - * @param $lc object Instance of LocalisationCache_BulkLoad (?)
117 - * @param $force bool Rebuild up-to-date languages
118 - * @return int Number of rebuilt languages
 116+ * @param $lc LocalisationCache Instance of LocalisationCache_BulkLoad (?)
 117+ * @param $force bool Rebuild up-to-date languages
 118+ * @return int Number of rebuilt languages
119119 */
120120 private function doRebuild( $codes, $lc, $force ) {
121121 $numRebuilt = 0;
@@ -127,6 +127,15 @@
128128 }
129129 return $numRebuilt;
130130 }
 131+
 132+ /**
 133+ * Sets whether a run of this maintenance script has the force parameter set
 134+ *
 135+ * @param bool $forced
 136+ */
 137+ public function setForce( $forced = true ) {
 138+ $this->mOptions['force'] = $forced;
 139+ }
131140 }
132141
133142 $maintClass = "RebuildLocalisationCache";
Index: branches/REL1_18/phase3/includes/installer/DatabaseUpdater.php
@@ -573,4 +573,15 @@
574574 $task = $this->maintenance->runChild( 'UpdateCollation' );
575575 $task->execute();
576576 }
 577+
 578+ protected function doRebuildLocalisationCache() {
 579+ /**
 580+ * @var $cl RebuildLocalisationCache
 581+ */
 582+ $cl = $this->maintenance->runChild( 'RebuildLocalisationCache', 'rebuildLocalisationCache.php' );
 583+ $this->output( "Rebuilding localisation cache...\n" );
 584+ $cl->setForce();
 585+ $cl->execute();
 586+ $this->output( "Rebuilding localisation cache done.\n" );
 587+ }
577588 }
Index: branches/REL1_18/phase3/includes/installer/MysqlUpdater.php
@@ -182,6 +182,7 @@
183183 array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
184184 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
185185 array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
 186+ array( 'doRebuildLocalisationCache' ),
186187 );
187188 }
188189
Index: branches/REL1_18/phase3/includes/installer/OracleUpdater.php
@@ -36,8 +36,7 @@
3737 array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ),
3838 array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
3939 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
40 -
41 - // till 2.0 i guess
 40+ array( 'doRebuildLocalisationCache' ),
4241 array( 'doRebuildDuplicateFunction' ),
4342
4443 );
Index: branches/REL1_18/phase3/includes/installer/SqliteUpdater.php
@@ -59,6 +59,7 @@
6060 array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
6161 array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
6262 array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'),
 63+ array( 'doRebuildLocalisationCache' ),
6364 );
6465 }
6566
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
6667 Merged /trunk/phase3/includes:r101449-101450,101454
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
6768 Merged /trunk/phase3:r101449-101450,101454

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101449Bug 30934 - Warning: Invalid argument supplied for foreach() in /languages/La...reedy05:23, 1 November 2011
r101450Followup r101449, bit better message outputreedy05:33, 1 November 2011
r101454Followup r101449, just changing forceRecache isn't actually enough...reedy07:34, 1 November 2011

Status & tagging log