Index: trunk/extensions/WikimediaMaintenance/dumpInterwiki.php |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | |
93 | 93 | # Site overrides for wikis whose DB names end in 'wiki' but that really belong to another site |
94 | 94 | $siteOverrides = array( |
95 | | - 'sourceswiki' => 'wikisource', |
| 95 | + 'sourceswiki' => array( 'wikisource', 'en' ), |
96 | 96 | ); |
97 | 97 | |
98 | 98 | # Extra interwiki links that can't be in the intermap for some reason |
— | — | @@ -182,7 +182,8 @@ |
183 | 183 | # Find out which site this DB belongs to |
184 | 184 | $site = false; |
185 | 185 | if ( isset( $siteOverrides[$db] ) ) { |
186 | | - $site = $sites[$siteOverrides[$db]]; |
| 186 | + list( $site, $lang ) = $siteOverrides[$db]; |
| 187 | + $site = $sites[$site]; |
187 | 188 | } else { |
188 | 189 | foreach ( $sites as $candidateSite ) { |
189 | 190 | $suffix = $candidateSite->suffix; |
— | — | @@ -191,6 +192,7 @@ |
192 | 193 | break; |
193 | 194 | } |
194 | 195 | } |
| 196 | + $lang = $matches[1]; |
195 | 197 | } |
196 | 198 | |
197 | 199 | $this->makeLink( array( 'iw_prefix' => $db, 'iw_url' => $site->suffix ), "__sites" ); |
— | — | @@ -198,7 +200,6 @@ |
199 | 201 | $this->error( "Invalid database $db\n" ); |
200 | 202 | continue; |
201 | 203 | } |
202 | | - $lang = $matches[1]; |
203 | 204 | |
204 | 205 | # Lateral links |
205 | 206 | foreach ( $sites as $targetSite ) { |