r70207 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70206‎ | r70207 | r70208 >
Date:20:17, 30 July 2010
Author:mah
Status:resolved (Comments)
Tags:
Comment:
* 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
Modified paths:
  • /trunk/phase3/includes/installer/CliInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -398,8 +398,9 @@
399399 foreach( $rows as $row ) {
400400 $row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee
401401 if ( $row == "" ) continue;
 402+ $row .= "||";
402403 $interwikis[] = array_combine(
403 - array( 'iw_prefix', 'iw_url', 'iw_local' ),
 404+ array( 'iw_prefix', 'iw_url', 'iw_local', 'iw_api', 'iw_wikiid' ),
404405 explode( '|', $row )
405406 );
406407 }
Index: trunk/phase3/includes/installer/CliInstaller.php
@@ -2,12 +2,12 @@
33
44 /**
55 * Class for the core installer command line interface.
6 - *
 6+ *
77 * @ingroup Deployment
88 * @since 1.17
99 */
1010 class CliInstaller extends CoreInstaller {
11 -
 11+
1212 private $optionMap = array(
1313 'dbtype' => 'wgDBtype',
1414 'dbserver' => 'wgDBserver',
@@ -78,6 +78,9 @@
7979 array( $this, 'startStage' ),
8080 array( $this, 'endStage' )
8181 );
 82+
 83+ $ls = new LocalSettingsGenerator( $this );
 84+ file_put_contents( "LocalSettings.php", $ls->getText() );
8285 }
8386
8487 public function startStage( $step ) {
Index: trunk/phase3/maintenance/parserTests.inc
@@ -673,21 +673,33 @@
674674 $db->insert( 'interwiki', array(
675675 array( 'iw_prefix' => 'wikipedia',
676676 'iw_url' => 'http://en.wikipedia.org/wiki/$1',
 677+ 'iw_api' => '',
 678+ 'iw_wikiid' => '',
677679 'iw_local' => 0 ),
678680 array( 'iw_prefix' => 'meatball',
679681 'iw_url' => 'http://www.usemod.com/cgi-bin/mb.pl?$1',
 682+ 'iw_api' => '',
 683+ 'iw_wikiid' => '',
680684 'iw_local' => 0 ),
681685 array( 'iw_prefix' => 'zh',
682686 'iw_url' => 'http://zh.wikipedia.org/wiki/$1',
 687+ 'iw_api' => '',
 688+ 'iw_wikiid' => '',
683689 'iw_local' => 1 ),
684690 array( 'iw_prefix' => 'es',
685691 'iw_url' => 'http://es.wikipedia.org/wiki/$1',
 692+ 'iw_api' => '',
 693+ 'iw_wikiid' => '',
686694 'iw_local' => 1 ),
687695 array( 'iw_prefix' => 'fr',
688696 'iw_url' => 'http://fr.wikipedia.org/wiki/$1',
 697+ 'iw_api' => '',
 698+ 'iw_wikiid' => '',
689699 'iw_local' => 1 ),
690700 array( 'iw_prefix' => 'ru',
691701 'iw_url' => 'http://ru.wikipedia.org/wiki/$1',
 702+ 'iw_api' => '',
 703+ 'iw_wikiid' => '',
692704 'iw_local' => 1 ),
693705 ) );
694706

Follow-up revisions

RevisionCommit summaryAuthorDate
r75858Followup r70207, make path for LocalSettings.php configurabledemon17:11, 2 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69542Add iw_api and iw_wikiid fields to the interwiki table, plus rudimentary supp...catrope11:55, 19 July 2010

Comments

#Comment by 😂 (talk | contribs)   16:57, 29 October 2010

We don't want to write this to maintenance/LocalSettings.php I'm guessing. Probably best to ask for a path.

Status & tagging log