From 64c208a27de87a713d44639d210aac1c8d7419d5 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Fri, 1 Aug 2014 13:58:51 -0700 Subject: [PATCH] Docs: Add note that you might want Title::getLinkURL 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index ab55257a04..24811788f2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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, -- 2.20.1