From 7443c47a08bef0b7fb86adbda614ddd09194d02d Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 17 Mar 2011 16:06:12 +0000 Subject: [PATCH] Enable preprocessDump.php to work without a db. Using the new hook added in r84173 --- maintenance/preprocessDump.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index b52d288fd6..89268ebe8f 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -56,6 +56,21 @@ class PreprocessDump extends Maintenance { return Maintenance::DB_NONE; } + public function finalSetup() { + parent::finalSetup(); + + global $wgUseDatabaseMessages, $wgLocalisationCacheConf, $wgHooks; + $wgUseDatabaseMessages = false; + $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null'; + $wgHooks['InterwikiLoadPrefix'][] = 'PreprocessDump::disableInterwikis'; + } + + static function disableInterwikis( $prefix, &$data ) { + # Title::newFromText will check on ach namespaced article if it's an interwiki. + + return false; + } + public function execute() { global $wgParser, $wgParserConf, $wgPreprocessorCacheThreshold; -- 2.20.1