Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/253053

Change subject: Improve the documentation of wfExpandUrl
......................................................................

Improve the documentation of wfExpandUrl

Bug: T118413
Change-Id: I71ad3e58b75d6c11ffbe8fe9c58a60968b370dea
---
M includes/GlobalFunctions.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/253053/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 421cd90..1b196c3 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -588,12 +588,17 @@
  *    For protocol-relative URLs, use the protocol of $wgCanonicalServer
  * PROTO_INTERNAL: Like PROTO_CANONICAL, but uses $wgInternalServer instead of 
$wgCanonicalServer
  *
+ * When $wgServer is not protocol-relative, PROTO_HTTP, PROTO_HTTPS, 
PROTO_RELATIVE
+ *    and PROTO_CURRENT are ignored and the protocol of $wgServer is used 
instead.
+ *
  * @todo this won't work with current-path-relative URLs
  * like "subdir/foo.html", etc.
  *
- * @param string $url Either fully-qualified or a local path + query
+ * @param string $url An URL; can be absolute (e.g. https://example.com/foo),
+ *    protocol-relative (//example.com/foo) or relative (/foo).
  * @param string $defaultProto One of the PROTO_* constants. Determines the
- *    protocol to use if $url or $wgServer is protocol-relative
+ *    protocol to use if $url is protocol-relative, and the domain to use if
+ *    $url is relative
  * @return string Fully-qualified URL, current-path-relative URL or false if
  *    no valid URL can be constructed
  */

-- 
To view, visit https://gerrit.wikimedia.org/r/253053
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71ad3e58b75d6c11ffbe8fe9c58a60968b370dea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to