Index: trunk/phase3/maintenance/update.php |
— | — | @@ -10,14 +10,11 @@ |
11 | 11 | */ |
12 | 12 | |
13 | 13 | /** */ |
| 14 | +define( 'MW_CMDLINE_CALLBACK', 'wfSetupUpdateScript' ); |
14 | 15 | $wgUseMasterForMaintenance = true; |
15 | 16 | require_once( dirname(__FILE__) . '/commandLine.inc' ); |
16 | 17 | require( "updaters.inc" ); |
17 | 18 | |
18 | | -# Don't try to load stuff from l10n_cache yet |
19 | | -$lc = Language::getLocalisationCache(); |
20 | | -$lc->disableBackend(); |
21 | | - |
22 | 19 | $wgTitle = Title::newFromText( "MediaWiki database updater" ); |
23 | 20 | |
24 | 21 | echo( "MediaWiki {$wgVersion} Updater\n\n" ); |
— | — | @@ -43,4 +40,16 @@ |
44 | 41 | |
45 | 42 | print "Done.\n"; |
46 | 43 | |
| 44 | +function wfSetupUpdateScript() { |
| 45 | + global $wgLocalisationCacheConf; |
47 | 46 | |
| 47 | + # Don't try to access the database |
| 48 | + # This needs to be disabled early since extensions will try to use the l10n |
| 49 | + # cache from $wgExtensionSetupFunctions (bug 20471) |
| 50 | + $wgLocalisationCacheConf = array( |
| 51 | + 'class' => 'LocalisationCache', |
| 52 | + 'storeClass' => 'LCStore_Null', |
| 53 | + 'storeDirectory' => false, |
| 54 | + 'manualRecache' => false, |
| 55 | + ); |
| 56 | +} |