Expose iw_trans in siteinfo API interwikimap prop
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 23 Oct 2013 22:16:02 +0000 (00:16 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 25 Oct 2013 19:10:32 +0000 (19:10 +0000)
It is already exposed by the Interwiki extension, deployed on all
Wikimedia wikis. I don't see why we would not expose it here.

Change-Id: I61712bac7a2ab5672a79de866617af2915b9e41b

includes/api/ApiQuerySiteinfo.php

index a776706..464693a 100644 (file)
@@ -357,7 +357,9 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        if ( $row['iw_local'] == '1' ) {
                                $val['local'] = '';
                        }
-                       // $val['trans'] = intval( $row['iw_trans'] ); // should this be exposed?
+                       if ( $row['iw_trans'] == '1' ) {
+                               $val['trans'] = '';
+                       }
                        if ( isset( $langNames[$prefix] ) ) {
                                $val['language'] = $langNames[$prefix];
                        }