Index: branches/wmf/1.18wmf1/maintenance/dumpInterwiki.php |
— | — | @@ -81,6 +81,11 @@ |
82 | 82 | 'wikiversity' => new Site( 'wikiversity', 'v', 'wikiversity.org' ), |
83 | 83 | ); |
84 | 84 | |
| 85 | + # Site overrides for wikis whose DB names end in 'wiki' but that really belong to another site |
| 86 | + $siteOverrides = array( |
| 87 | + 'sourceswiki' => 'wikisource', |
| 88 | + ); |
| 89 | + |
85 | 90 | # Extra interwiki links that can't be in the intermap for some reason |
86 | 91 | $extraLinks = array( |
87 | 92 | array( 'm', $this->urlprotocol . '//meta.wikimedia.org/wiki/$1', 1 ), |
— | — | @@ -168,13 +173,18 @@ |
169 | 174 | } else { |
170 | 175 | # Find out which site this DB belongs to |
171 | 176 | $site = false; |
172 | | - foreach ( $sites as $candidateSite ) { |
173 | | - $suffix = $candidateSite->suffix; |
174 | | - if ( preg_match( "/(.*)$suffix$/", $db, $matches ) ) { |
175 | | - $site = $candidateSite; |
176 | | - break; |
| 177 | + if ( isset( $siteOverrides[$db] ) ) { |
| 178 | + $site = $sites[$siteOverrides[$db]]; |
| 179 | + } else { |
| 180 | + foreach ( $sites as $candidateSite ) { |
| 181 | + $suffix = $candidateSite->suffix; |
| 182 | + if ( preg_match( "/(.*)$suffix$/", $db, $matches ) ) { |
| 183 | + $site = $candidateSite; |
| 184 | + break; |
| 185 | + } |
177 | 186 | } |
178 | 187 | } |
| 188 | + |
179 | 189 | $this->makeLink( array( 'iw_prefix' => $db, 'iw_url' => $site->suffix ), "__sites" ); |
180 | 190 | if ( !$site ) { |
181 | 191 | $this->error( "Invalid database $db\n" ); |
Property changes on: branches/wmf/1.18wmf1/maintenance/dumpInterwiki.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
182 | 192 | Merged /trunk/extensions/WikimediaMaintenance/dumpInterwiki.php:r102388 |