Docs: Add note that you might want Title::getLinkURL
authorErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 1 Aug 2014 20:58:51 +0000 (13:58 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 1 Aug 2014 21:21:45 +0000 (14:21 -0700)
While there are valid use cases of Title::getLocalURL, it is safer
to use Title::getLinkURL in most instances.  Additionally developers
won't accidentally their fragments that way.

Change-Id: I1bf567ba9c38103d39a883e8ea3a60f9f2082181

includes/Title.php

index ab55257..2481178 100644 (file)
@@ -1643,6 +1643,8 @@ class Title {
         * $wgServer is prepended to make an absolute URL.
         *
         * @see self::getFullURL to always get an absolute URL.
+        * @see self::getLinkURL to always get a URL that's the simplest URL that will be
+        *  valid to link, locally, to the current Title.
         * @see self::newFromText to produce a Title object.
         *
         * @param string|array $query An optional query string,