Indicate whether interwiki links can use protocol-relative URLs.
authorC. Scott Ananian <cscott@cscott.net>
Mon, 19 May 2014 22:22:32 +0000 (15:22 -0700)
committerC. Scott Ananian <cscott@cscott.net>
Mon, 19 May 2014 22:26:44 +0000 (15:26 -0700)
Change-Id: I17360e44f0be7490357bc9bc7af27d0a950012de

includes/api/ApiQuerySiteinfo.php

index ea3a084..0a97d04 100644 (file)
@@ -396,6 +396,9 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                                $val['language'] = $langNames[$prefix];
                        }
                        $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
+                       if (substr( $row['iw_url'], 0, 2) == '//') {
+                               $val['protorel'] = true;
+                       }
                        if ( isset( $row['iw_wikiid'] ) ) {
                                $val['wikiid'] = $row['iw_wikiid'];
                        }