From: Aryeh Gregor Date: Fri, 10 Oct 2008 15:37:51 +0000 (+0000) Subject: Add more info to Title::newFromText() comment X-Git-Tag: 1.31.0-rc.0~44811 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=815ba71f105bcd033d98a2c242259530163857c8;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) {