define( 'STDERR', fopen("php://stderr", "wb"));
$wgUseDatabaseMessages = false; /* FIXME: For database failure */
require_once( "$IP/includes/Setup.php" );
+ Language::getLocalisationCache()->disableBackend();
+
chdir( "config" );
$wgTitle = Title::newFromText( "Installation script" );
'Job' => 'includes/JobQueue.php',
'LCStore_DB' => 'includes/LocalisationCache.php',
'LCStore_CDB' => 'includes/LocalisationCache.php',
+ 'LCStore_Null' => 'includes/LocalisationCache.php',
'License' => 'includes/Licenses.php',
'Licenses' => 'includes/Licenses.php',
'LinkBatch' => 'includes/LinkBatch.php',
}
}
}
+
+ /**
+ * Disable the storage backend
+ */
+ public function disableBackend() {
+ $this->store = new LCStore_Null;
+ }
}
/**
}
}
+/**
+ * Null store backend, used to avoid DB errors during install
+ */
+class LCStore_Null implements LCStore {
+ public function get( $code, $key ) {
+ return null;
+ }
+
+ public function startWrite( $code ) {}
+ public function finishWrite() {}
+ public function set( $key, $value ) {}
+}
+
/**
* A localisation cache optimised for loading large amounts of data for many
* languages. Used by rebuildLocalisationCache.php.
$wgUseMasterForMaintenance = true;
require( "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" );