From aeb2df736ba766dc4948b49634cef33535377717 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Fri, 30 Jul 2010 20:17:28 +0000 Subject: [PATCH] * Make parsertests work with interwiki table on sqlite * re r69542 temporary fix for new-installer + interwiki table * temporary fix for outputing LocalSettings.php in the CliInstaller --- includes/installer/CliInstaller.php | 7 +++++-- includes/installer/DatabaseInstaller.php | 3 ++- maintenance/parserTests.inc | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 56602b5efa..9b356d80af 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -2,12 +2,12 @@ /** * Class for the core installer command line interface. - * + * * @ingroup Deployment * @since 1.17 */ class CliInstaller extends CoreInstaller { - + private $optionMap = array( 'dbtype' => 'wgDBtype', 'dbserver' => 'wgDBserver', @@ -78,6 +78,9 @@ class CliInstaller extends CoreInstaller { array( $this, 'startStage' ), array( $this, 'endStage' ) ); + + $ls = new LocalSettingsGenerator( $this ); + file_put_contents( "LocalSettings.php", $ls->getText() ); } public function startStage( $step ) { diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 456e8e5e35..7342fa2bae 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -398,8 +398,9 @@ abstract class DatabaseInstaller { foreach( $rows as $row ) { $row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee if ( $row == "" ) continue; + $row .= "||"; $interwikis[] = array_combine( - array( 'iw_prefix', 'iw_url', 'iw_local' ), + array( 'iw_prefix', 'iw_url', 'iw_local', 'iw_api', 'iw_wikiid' ), explode( '|', $row ) ); } diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 3c315ede7a..e1d5d86ec0 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -673,21 +673,33 @@ class ParserTest { $db->insert( 'interwiki', array( array( 'iw_prefix' => 'wikipedia', 'iw_url' => 'http://en.wikipedia.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 0 ), array( 'iw_prefix' => 'meatball', 'iw_url' => 'http://www.usemod.com/cgi-bin/mb.pl?$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 0 ), array( 'iw_prefix' => 'zh', 'iw_url' => 'http://zh.wikipedia.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 1 ), array( 'iw_prefix' => 'es', 'iw_url' => 'http://es.wikipedia.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 1 ), array( 'iw_prefix' => 'fr', 'iw_url' => 'http://fr.wikipedia.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 1 ), array( 'iw_prefix' => 'ru', 'iw_url' => 'http://ru.wikipedia.org/wiki/$1', + 'iw_api' => '', + 'iw_wikiid' => '', 'iw_local' => 1 ), ) ); -- 2.20.1