Index: trunk/phase3/maintenance/rebuildLocalisationCache.php |
— | — | @@ -112,9 +112,9 @@ |
113 | 113 | * Helper function to rebuild list of languages codes. Prints the code |
114 | 114 | * for each language which is rebuilt. |
115 | 115 | * @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 |
119 | 119 | */ |
120 | 120 | private function doRebuild( $codes, $lc, $force ) { |
121 | 121 | $numRebuilt = 0; |
— | — | @@ -127,6 +127,15 @@ |
128 | 128 | } |
129 | 129 | return $numRebuilt; |
130 | 130 | } |
| 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 | + } |
131 | 140 | } |
132 | 141 | |
133 | 142 | $maintClass = "RebuildLocalisationCache"; |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -621,10 +621,12 @@ |
622 | 622 | } |
623 | 623 | |
624 | 624 | protected function doRebuildLocalisationCache() { |
625 | | - global $wgLocalisationCacheConf; |
626 | | - $wgLocalisationCacheConf['forceRecache'] = true; |
| 625 | + /** |
| 626 | + * @var $cl RebuildLocalisationCache |
| 627 | + */ |
627 | 628 | $cl = $this->maintenance->runChild( 'RebuildLocalisationCache', 'rebuildLocalisationCache.php' ); |
628 | 629 | $this->output( "Rebuilding localisation cache...\n" ); |
| 630 | + $cl->setForce(); |
629 | 631 | $cl->execute(); |
630 | 632 | $this->output( "Rebuilding localisation cache done.\n" ); |
631 | 633 | } |