r86756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86755‎ | r86756 | r86757 >
Date:11:50, 23 April 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap

Waiting on bug 28673 to be merged to core and be used, before this is of any use, but it's done anyway
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -221,8 +221,7 @@
222222 protected function appendSpecialPageAliases( $property ) {
223223 global $wgContLang;
224224 $data = array();
225 - foreach ( $wgContLang->getSpecialPageAliases() as $specialpage => $aliases )
226 - {
 225+ foreach ( $wgContLang->getSpecialPageAliases() as $specialpage => $aliases ) {
227226 $arr = array( 'realname' => $specialpage, 'aliases' => $aliases );
228227 $this->getResult()->setIndexedTagName( $arr['aliases'], 'alias' );
229228 $data[] = $arr;
@@ -250,7 +249,7 @@
251250 protected function appendInterwikiMap( $property, $filter ) {
252251 $this->resetQueryParams();
253252 $this->addTables( 'interwiki' );
254 - $this->addFields( array( 'iw_prefix', 'iw_local', 'iw_url' ) );
 253+ $this->addFields( array( 'iw_prefix', 'iw_local', 'iw_url', 'iw_wikiid', 'iw_api' ) );
255254
256255 if ( $filter === 'local' ) {
257256 $this->addWhere( 'iw_local = 1' );
@@ -277,6 +276,8 @@
278277 $val['language'] = $langNames[$row->iw_prefix];
279278 }
280279 $val['url'] = $row->iw_url;
 280+ $val['wikiid'] = $row->iw_wikiid;
 281+ $val['api'] = $row->iw_api;
281282
282283 $data[] = $val;
283284 }
Index: trunk/phase3/RELEASE-NOTES
@@ -345,6 +345,7 @@
346346 * (bug 28591) Update/replace/supplement spyc (YAML parsing library)
347347 * YAML API output is now 1.2 compliant, using JSON as the formatter
348348 * (bug 28672) give information about misermode on api
 349+* (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap
349350
350351 === Languages updated in 1.18 ===
351352

Status & tagging log