Bug 30934 - Warning: Invalid argument supplied for foreach() in /languages/Language...
authorSam Reed <reedy@users.mediawiki.org>
Tue, 1 Nov 2011 05:23:08 +0000 (05:23 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 1 Nov 2011 05:23:08 +0000 (05:23 +0000)
Doing a run of doRebuildLocalisationCache on each run of update.php

includes/installer/DatabaseUpdater.php
includes/installer/MysqlUpdater.php
includes/installer/OracleUpdater.php
includes/installer/SqliteUpdater.php

index b21f694..1d2897b 100644 (file)
@@ -619,4 +619,13 @@ abstract class DatabaseUpdater {
                $cl->execute();
                $this->output( "done.\n" );
        }
+
+       protected function doRebuildLocalisationCache() {
+               global $wgLocalisationCacheConf;
+               $wgLocalisationCacheConf['forceRecache'] = true;
+               $cl = $this->maintenance->runChild( 'RebuildLocalisationCache', 'rebuildLocalisationCache.php' );
+               $this->output( "Rebuilding Localisation Cache... " );
+               $cl->execute();
+               $this->output( "done.\n" );
+       }
 }
index 30715fd..ad6f7fa 100644 (file)
@@ -181,6 +181,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
                        array( 'addTable', 'uploadstash',                       'patch-uploadstash.sql' ),
                        array( 'addTable', 'user_former_groups',                'patch-user_former_groups.sql'),
+                       array( 'doRebuildLocalisationCache' ),
 
                        // 1.19
                        array( 'addTable', 'config',                            'patch-config.sql' ),
index ebc1518..027244c 100644 (file)
@@ -36,6 +36,7 @@ class OracleUpdater extends DatabaseUpdater {
                        array( 'addIndex',      'user',          'i02',       'patch-user_email_index.sql' ),
                        array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
                        array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
+                       array( 'doRebuildLocalisationCache' ),
 
                        //1.19
                        array( 'addTable', 'config', 'patch-config.sql' ),
@@ -43,7 +44,7 @@ class OracleUpdater extends DatabaseUpdater {
                        array( 'addTable', 'globaltemplatelinks', 'patch-globaltemplatelinks.sql' ),
                        array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ),
                        array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ),
-                       
+
                        // till 2.0 i guess
                        array( 'doRebuildDuplicateFunction' ),
 
index 19e12c5..2520a0f 100644 (file)
@@ -59,6 +59,7 @@ class SqliteUpdater extends DatabaseUpdater {
                        array( 'addIndex', 'user',          'user_email',       'patch-user_email_index.sql' ),
                        array( 'addTable', 'uploadstash',                       'patch-uploadstash.sql' ),
                        array( 'addTable', 'user_former_groups',                'patch-user_former_groups.sql'),
+                       array( 'doRebuildLocalisationCache' ),
 
                        // 1.19
                        array( 'addTable', 'config',                            'patch-config.sql' ),