r102545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102544‎ | r102545 | r102546 >
Date:17:38, 9 November 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r102388: fix regression where on sourceswiki (and any other sites in siteOverrides) w:, q:, etc. would point to a more or less random language (sn in this case).
Modified paths:
  • /trunk/extensions/WikimediaMaintenance/dumpInterwiki.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMaintenance/dumpInterwiki.php
@@ -91,7 +91,7 @@
9292
9393 # Site overrides for wikis whose DB names end in 'wiki' but that really belong to another site
9494 $siteOverrides = array(
95 - 'sourceswiki' => 'wikisource',
 95+ 'sourceswiki' => array( 'wikisource', 'en' ),
9696 );
9797
9898 # Extra interwiki links that can't be in the intermap for some reason
@@ -182,7 +182,8 @@
183183 # Find out which site this DB belongs to
184184 $site = false;
185185 if ( isset( $siteOverrides[$db] ) ) {
186 - $site = $sites[$siteOverrides[$db]];
 186+ list( $site, $lang ) = $siteOverrides[$db];
 187+ $site = $sites[$site];
187188 } else {
188189 foreach ( $sites as $candidateSite ) {
189190 $suffix = $candidateSite->suffix;
@@ -191,6 +192,7 @@
192193 break;
193194 }
194195 }
 196+ $lang = $matches[1];
195197 }
196198
197199 $this->makeLink( array( 'iw_prefix' => $db, 'iw_url' => $site->suffix ), "__sites" );
@@ -198,7 +200,6 @@
199201 $this->error( "Invalid database $db\n" );
200202 continue;
201203 }
202 - $lang = $matches[1];
203204
204205 # Lateral links
205206 foreach ( $sites as $targetSite ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r1025581.18wmf1: MFT r102545catrope18:56, 9 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102388(bug 29591) Special-case sourceswiki in the interwiki mapcatrope11:05, 8 November 2011

Status & tagging log