* (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap
authorSam Reed <reedy@users.mediawiki.org>
Sat, 23 Apr 2011 11:50:20 +0000 (11:50 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 23 Apr 2011 11:50:20 +0000 (11:50 +0000)
Waiting on bug 28673 to be merged to core and be used, before this is of any use, but it's done anyway

RELEASE-NOTES
includes/api/ApiQuerySiteinfo.php

index 1f70092..4b603b3 100644 (file)
@@ -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 ===
 
index 658f9fd..5c7175c 100644 (file)
@@ -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;
                }