Index: branches/REL1_18/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: branches/REL1_18/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -573,4 +573,15 @@ |
574 | 574 | $task = $this->maintenance->runChild( 'UpdateCollation' ); |
575 | 575 | $task->execute(); |
576 | 576 | } |
| 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 | + } |
577 | 588 | } |
Index: branches/REL1_18/phase3/includes/installer/MysqlUpdater.php |
— | — | @@ -182,6 +182,7 @@ |
183 | 183 | array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), |
184 | 184 | array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
185 | 185 | array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
| 186 | + array( 'doRebuildLocalisationCache' ), |
186 | 187 | ); |
187 | 188 | } |
188 | 189 | |
Index: branches/REL1_18/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -36,8 +36,7 @@ |
37 | 37 | array( 'addIndex', 'user', 'i02', 'patch-user_email_index.sql' ), |
38 | 38 | array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ), |
39 | 39 | array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
40 | | - |
41 | | - // till 2.0 i guess |
| 40 | + array( 'doRebuildLocalisationCache' ), |
42 | 41 | array( 'doRebuildDuplicateFunction' ), |
43 | 42 | |
44 | 43 | ); |
Index: branches/REL1_18/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ), |
61 | 61 | array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), |
62 | 62 | array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql'), |
| 63 | + array( 'doRebuildLocalisationCache' ), |
63 | 64 | ); |
64 | 65 | } |
65 | 66 | |
Property changes on: branches/REL1_18/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
66 | 67 | Merged /trunk/phase3/includes:r101449-101450,101454 |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
67 | 68 | Merged /trunk/phase3:r101449-101450,101454 |