From 815ba71f105bcd033d98a2c242259530163857c8 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 10 Oct 2008 15:37:51 +0000 Subject: [PATCH] Add more info to Title::newFromText() comment Point the reader to makeTitle() and makeTitleSafe() to force a namespace to be used regardless of prefix, to hopefully reduce confusion. --- includes/Title.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Title.php b/includes/Title.php index cbef1ca1c6..7f1179e5c2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -100,7 +100,9 @@ class Title { * @param $text string The link text; spaces, prefixes, and an * initial ':' indicating the main namespace are accepted. * @param $defaultNamespace int The namespace to use if none is speci- - * fied by a prefix. + * fied by a prefix. If you want to force a specific namespace even if + * $text might begin with a namespace prefix, use makeTitle() or + * makeTitleSafe(). * @return Title The new object, or null on an error. */ public static function newFromText( $text, $defaultNamespace = NS_MAIN ) { -- 2.20.1