(bug 14028) Added language attribute to interwiki map in meta=siteinfo
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 9 May 2008 09:41:53 +0000 (09:41 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 9 May 2008 09:41:53 +0000 (09:41 +0000)
RELEASE-NOTES
includes/api/ApiQuerySiteinfo.php

index 8089db7..7953c87 100644 (file)
@@ -324,6 +324,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13993) apfrom doesn't work with apdir=descending
 * (bug 14018) Introduced alcontinue to list=alllinks to improve paging
 * (bug 14013) Added rcshow=patrolled to list=recentchanges
+* (bug 14028) Added language attribute to interwiki map in meta=siteinfo
 
 === Languages updated in 1.13 ===
 
index 98467f2..244a665 100644 (file)
@@ -170,13 +170,16 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $res = $this->select(__METHOD__);
 
                $data = array();
+               $langNames = Language::getLanguageNames();
                while($row = $db->fetchObject($res))
                {
                        $val = array();
                        $val['prefix'] = $row->iw_prefix;
-                       if ($row->iw_local == '1')
+                       if($row->iw_local == '1')
                                $val['local'] = '';
 //                     $val['trans'] = intval($row->iw_trans); // should this be exposed?
+                       if(isset($langNames[$row->iw_prefix]))
+                               $val['language'] = $langNames[$row->iw_prefix];
                        $val['url'] = $row->iw_url;
 
                        $data[] = $val;