From 25a5344514408dd3d83c0acf34663f130337a604 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 4 Sep 2009 02:03:23 +0000 Subject: [PATCH] (bug 20471) In update.php, disable the LocalisationCache storage backend before Setup.php is run, to avoid having extensions die when they try to access the l10n_cache table from $wgExtensionSetupFunctions. --- maintenance/update.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/maintenance/update.php b/maintenance/update.php index c473153e19..abd0bebb25 100644 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -10,14 +10,11 @@ */ /** */ +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" ); @@ -43,4 +40,16 @@ do_all_updates( $shared, $purge ); 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, + ); +} -- 2.20.1