From: Platonides Date: Thu, 17 Mar 2011 16:06:12 +0000 (+0000) Subject: Enable preprocessDump.php to work without a db. X-Git-Tag: 1.31.0-rc.0~31363 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=7443c47a08bef0b7fb86adbda614ddd09194d02d;p=lhc%2Fweb%2Fwiklou.git Enable preprocessDump.php to work without a db. Using the new hook added in r84173 --- 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;