From 2305a446d67c8e667859d29b5138397d11f65b89 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 2 Jun 2009 04:05:47 +0000 Subject: [PATCH] Fixed documentation on Title::newFromURL(). Never use this function. --- includes/Title.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index baea55ef57..d373c16264 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -152,6 +152,14 @@ class Title { } /** + * THIS IS NOT THE FUNCTION YOU WANT. Use Title::newFromText(). + * + * Example of wrong and broken code: + * $title = Title::newFromURL( $wgRequest->getVal( 'title' ) ); + * + * Example of right code: + * $title = Title::newFromText( $wgRequest->getVal( 'title' ) ); + * * Create a new Title from URL-encoded text. Ensures that * the given title's length does not exceed the maximum. * @param $url \type{\string} the title, as might be taken from a URL -- 2.20.1