(bug 20471) In update.php, disable the LocalisationCache storage backend before Setup...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 4 Sep 2009 02:03:23 +0000 (02:03 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 4 Sep 2009 02:03:23 +0000 (02:03 +0000)
maintenance/update.php

index c473153..abd0beb 100644 (file)
  */
 
 /** */
+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,
+       );
+}