*/
/** */
+define( 'MW_CMDLINE_CALLBACK', 'wfSetupUpdateScript' );
$wgUseMasterForMaintenance = true;
require_once( dirname(__FILE__) . '/commandLine.inc' );
require( "updaters.inc" );
-# Don't try to load stuff from l10n_cache yet
-$lc = Language::getLocalisationCache();
-$lc->disableBackend();
-
$wgTitle = Title::newFromText( "MediaWiki database updater" );
echo( "MediaWiki {$wgVersion} Updater\n\n" );
print "Done.\n";
-
+function wfSetupUpdateScript() {
+ global $wgLocalisationCacheConf;
+
+ # Don't try to access the database
+ # This needs to be disabled early since extensions will try to use the l10n
+ # cache from $wgExtensionSetupFunctions (bug 20471)
+ $wgLocalisationCacheConf = array(
+ 'class' => 'LocalisationCache',
+ 'storeClass' => 'LCStore_Null',
+ 'storeDirectory' => false,
+ 'manualRecache' => false,
+ );
+}