From 45785d0eb9736ccf7ed9a3d12922057bca7a2107 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 28 Jul 2009 00:07:03 +0000 Subject: [PATCH] Comment on limitations of wfExpandUrl --- includes/GlobalFunctions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 */ -- 2.20.1