From: Sam Reed Date: Sat, 23 Apr 2011 11:50:20 +0000 (+0000) Subject: * (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap X-Git-Tag: 1.31.0-rc.0~30615 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=80f62dd3d9bca2ebbdd33c1ebbbae1d8288c8b83;p=lhc%2Fweb%2Fwiklou.git * (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 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1f70092697..4b603b38f4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -345,6 +345,7 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 28591) Update/replace/supplement spyc (YAML parsing library) * YAML API output is now 1.2 compliant, using JSON as the formatter * (bug 28672) give information about misermode on api +* (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap === Languages updated in 1.18 === diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 658f9fd9d2..5c7175c78f 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -221,8 +221,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { protected function appendSpecialPageAliases( $property ) { global $wgContLang; $data = array(); - foreach ( $wgContLang->getSpecialPageAliases() as $specialpage => $aliases ) - { + foreach ( $wgContLang->getSpecialPageAliases() as $specialpage => $aliases ) { $arr = array( 'realname' => $specialpage, 'aliases' => $aliases ); $this->getResult()->setIndexedTagName( $arr['aliases'], 'alias' ); $data[] = $arr; @@ -250,7 +249,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { protected function appendInterwikiMap( $property, $filter ) { $this->resetQueryParams(); $this->addTables( 'interwiki' ); - $this->addFields( array( 'iw_prefix', 'iw_local', 'iw_url' ) ); + $this->addFields( array( 'iw_prefix', 'iw_local', 'iw_url', 'iw_wikiid', 'iw_api' ) ); if ( $filter === 'local' ) { $this->addWhere( 'iw_local = 1' ); @@ -277,6 +276,8 @@ class ApiQuerySiteinfo extends ApiQueryBase { $val['language'] = $langNames[$row->iw_prefix]; } $val['url'] = $row->iw_url; + $val['wikiid'] = $row->iw_wikiid; + $val['api'] = $row->iw_api; $data[] = $val; }