Disable the db LCStore if the maintenance script doesn't need a db.
authorPlatonides <platonides@gmail.com>
Tue, 26 Jun 2012 16:58:37 +0000 (18:58 +0200)
committerPlatonides <platonides@gmail.com>
Tue, 26 Jun 2012 16:58:37 +0000 (18:58 +0200)
If $wgLanguageCode != 'en', loading of the language class will
go to the LCStore looking for the fallbacks, even if the script
doesn't need a database.

Change-Id: I6a1920ba02d146622f3a5647bf02ddec3e3da54b

maintenance/doMaintenance.php

index 6b29c5f..2bb2a0f 100644 (file)
@@ -93,6 +93,11 @@ if ( $maintenance->getDbType() === Maintenance::DB_ADMIN &&
 {
        require( MWInit::interpretedPath( 'AdminSettings.php' ) );
 }
+
+if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
+       if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) )
+               $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+}
 $maintenance->finalSetup();
 // Some last includes
 require_once( MWInit::compiledPath( 'includes/Setup.php' ) );