Index: trunk/phase3/maintenance/update.php |
— | — | @@ -13,6 +13,11 @@ |
14 | 14 | $wgUseMasterForMaintenance = true; |
15 | 15 | require( "commandLine.inc" ); |
16 | 16 | require( "updaters.inc" ); |
| 17 | + |
| 18 | +# Don't try to load stuff from l10n_cache yet |
| 19 | +$lc = Language::getLocalisationCache(); |
| 20 | +$lc->disableBackend(); |
| 21 | + |
17 | 22 | $wgTitle = Title::newFromText( "MediaWiki database updater" ); |
18 | 23 | |
19 | 24 | echo( "MediaWiki {$wgVersion} Updater\n\n" ); |
Index: trunk/phase3/includes/LocalisationCache.php |
— | — | @@ -648,6 +648,13 @@ |
649 | 649 | } |
650 | 650 | } |
651 | 651 | } |
| 652 | + |
| 653 | + /** |
| 654 | + * Disable the storage backend |
| 655 | + */ |
| 656 | + public function disableBackend() { |
| 657 | + $this->store = new LCStore_Null; |
| 658 | + } |
652 | 659 | } |
653 | 660 | |
654 | 661 | /** |
— | — | @@ -825,6 +832,19 @@ |
826 | 833 | } |
827 | 834 | |
828 | 835 | /** |
| 836 | + * Null store backend, used to avoid DB errors during install |
| 837 | + */ |
| 838 | +class LCStore_Null implements LCStore { |
| 839 | + public function get( $code, $key ) { |
| 840 | + return null; |
| 841 | + } |
| 842 | + |
| 843 | + public function startWrite( $code ) {} |
| 844 | + public function finishWrite() {} |
| 845 | + public function set( $key, $value ) {} |
| 846 | +} |
| 847 | + |
| 848 | +/** |
829 | 849 | * A localisation cache optimised for loading large amounts of data for many |
830 | 850 | * languages. Used by rebuildLocalisationCache.php. |
831 | 851 | */ |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -117,6 +117,7 @@ |
118 | 118 | 'Job' => 'includes/JobQueue.php', |
119 | 119 | 'LCStore_DB' => 'includes/LocalisationCache.php', |
120 | 120 | 'LCStore_CDB' => 'includes/LocalisationCache.php', |
| 121 | + 'LCStore_Null' => 'includes/LocalisationCache.php', |
121 | 122 | 'License' => 'includes/Licenses.php', |
122 | 123 | 'Licenses' => 'includes/Licenses.php', |
123 | 124 | 'LinkBatch' => 'includes/LinkBatch.php', |
Index: trunk/phase3/config/index.php |
— | — | @@ -831,6 +831,8 @@ |
832 | 832 | define( 'STDERR', fopen("php://stderr", "wb")); |
833 | 833 | $wgUseDatabaseMessages = false; /* FIXME: For database failure */ |
834 | 834 | require_once( "$IP/includes/Setup.php" ); |
| 835 | + Language::getLocalisationCache()->disableBackend(); |
| 836 | + |
835 | 837 | chdir( "config" ); |
836 | 838 | |
837 | 839 | $wgTitle = Title::newFromText( "Installation script" ); |