summaryrefslogtreecommitdiff
path: root/maintenance/rebuildLocalisationCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/rebuildLocalisationCache.php')
-rw-r--r--maintenance/rebuildLocalisationCache.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php
index 83849de6..db77564b 100644
--- a/maintenance/rebuildLocalisationCache.php
+++ b/maintenance/rebuildLocalisationCache.php
@@ -53,6 +53,15 @@ class RebuildLocalisationCache extends Maintenance {
return '1000M';
}
+ public function finalSetup() {
+ # This script needs to be run to build the inital l10n cache. But if
+ # $wgLanguageCode is not 'en', it won't be able to run because there is
+ # no l10n cache. Break the cycle by forcing $wgLanguageCode = 'en'.
+ global $wgLanguageCode;
+ $wgLanguageCode = 'en';
+ return parent::finalSetup();
+ }
+
public function execute() {
global $wgLocalisationCacheConf;