From: Aryeh Gregor Date: Tue, 28 Jul 2009 00:07:03 +0000 (+0000) Subject: Comment on limitations of wfExpandUrl X-Git-Tag: 1.31.0-rc.0~40680 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=45785d0eb9736ccf7ed9a3d12922057bca7a2107;p=lhc%2Fweb%2Fwiklou.git Comment on limitations of wfExpandUrl --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ea824f2a67..ce3c69a6f2 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1303,8 +1303,12 @@ function wfAppendQuery( $url, $query ) { } /** - * Expand a potentially local URL to a fully-qualified URL. - * Assumes $wgServer is correct. :) + * Expand a potentially local URL to a fully-qualified URL. Assumes $wgServer + * is correct. Also doesn't handle any type of relative URL except one + * starting with a single "/": this won't work with current-path-relative URLs + * like "subdir/foo.html", protocol-relative URLs like + * "//en.wikipedia.org/wiki/", etc. TODO: improve this! + * * @param $url String: either fully-qualified or a local path + query * @return string Fully-qualified URL */