r51326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51325‎ | r51326 | r51327 >
Date:04:05, 2 June 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fixed documentation on Title::newFromURL(). Never use this function.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -152,6 +152,14 @@
153153 }
154154
155155 /**
 156+ * THIS IS NOT THE FUNCTION YOU WANT. Use Title::newFromText().
 157+ *
 158+ * Example of wrong and broken code:
 159+ * $title = Title::newFromURL( $wgRequest->getVal( 'title' ) );
 160+ *
 161+ * Example of right code:
 162+ * $title = Title::newFromText( $wgRequest->getVal( 'title' ) );
 163+ *
156164 * Create a new Title from URL-encoded text. Ensures that
157165 * the given title's length does not exceed the maximum.
158166 * @param $url \type{\string} the title, as might be taken from a URL

Status & tagging log