aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryExternalLinks.php
diff options
context:
space:
mode:
authorRoan Kattouw <catrope@users.mediawiki.org>2011-07-13 01:27:07 +0000
committerRoan Kattouw <catrope@users.mediawiki.org>2011-07-13 01:27:07 +0000
commit7b8b23e8b4efbcdd2f799c12ae9e66576a7c6678 (patch)
treedbb19a805703fcafab788e9e779b1c3d5944403a /includes/api/ApiQueryExternalLinks.php
parent3d780db426093f40d46389fc60ea70be388d2734 (diff)
downloadmediawikicore-7b8b23e8b4efbcdd2f799c12ae9e66576a7c6678.tar.gz
mediawikicore-7b8b23e8b4efbcdd2f799c12ae9e66576a7c6678.zip
Per wikitech-l, run a bunch of URLs in the API output through wfExpandUrl(), so they become fully-qualified even if they were originally protocol-relative
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92044
Diffstat (limited to 'includes/api/ApiQueryExternalLinks.php')
-rw-r--r--includes/api/ApiQueryExternalLinks.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php
index 88d3258305bd..85a1bcc7d9e8 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -86,6 +86,7 @@ class ApiQueryExternalLinks extends ApiQueryBase {
break;
}
$entry = array();
+ // We *could* run this through wfExpandUrl() but I think it's better to output the link verbatim, even if it's protocol-relative --Roan
ApiResult::setContent( $entry, $row->el_to );
$fit = $this->addPageSubItem( $row->el_from, $entry );
if ( !$fit ) {