Update the Interwiki::getURL code to use isset(), and update the comment to tell pre-1.19 supporting extensions to do the entire urlencoding and $1 substitution on their own since Interwiki::getURL was essentially buggy and broken before now.
*
* @param $title String: what text to put for the article name
* @return String: the URL
- * @note Prior to 1.19 getURL did not urlencode the $title, if you use this
- * arg in an extension that supports MW earlier than 1.19 please ensure
- * you wfUrlencode it when installed in earlier versions of MW.
+ * @note Prior to 1.19 The getURL with an argument was broken.
+ * If you if you use this arg in an extension that supports MW earlier
+ * than 1.19 please wfUrlencode and substitute $1 on your own.
*/
public function getURL( $title = null ) {
$url = $this->mURL;
- if( $title != null ) {
+ if( isset($title) ) {
$url = str_replace( "$1", wfUrlencode( $title ), $url );
}
return $url;