X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FrebuildLocalisationCache.php;h=db77564b36171af4bb25b11bf7258336e4d55352;hb=cf0872c783946242698bfaf9bd134d503fc393fc;hp=83849de65b03a154d3a231e0cad1acad3ba02535;hpb=67bfdc7a68940d901e585eadd984a2074bf0216a;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index 83849de65b..db77564b36 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;