- /**
- * @deprecated since 1.16 Use link()
- *
- * This function is a shortcut to makeLinkObj(Title::newFromText($title),...). Do not call
- * it if you already have a title object handy. See makeLinkObj for further documentation.
- *
- * @param $title String: the text of the title
- * @param $text String: link text
- * @param $query String: optional query part
- * @param $trail String: optional trail. Alphabetic characters at the start of this string will
- * be included in the link text. Other characters will be appended after
- * the end of the link.
- */
- static function makeLink( $title, $text = '', $query = '', $trail = '' ) {
- wfProfileIn( __METHOD__ );
- $nt = Title::newFromText( $title );
- if ( $nt instanceof Title ) {
- $result = self::makeLinkObj( $nt, $text, $query, $trail );
- } else {
- wfDebug( 'Invalid title passed to self::makeLink(): "' . $title . "\"\n" );
- $result = $text == "" ? $title : $text;
- }
-
- wfProfileOut( __METHOD__ );
- return $result;
- }
-
- /**
- * @deprecated since 1.16 Use link()
- *
- * This function is a shortcut to makeKnownLinkObj(Title::newFromText($title),...). Do not call
- * it if you already have a title object handy. See makeKnownLinkObj for further documentation.
- *
- * @param $title String: the text of the title
- * @param $text String: link text
- * @param $query String: optional query part
- * @param $trail String: optional trail. Alphabetic characters at the start of this string will
- * be included in the link text. Other characters will be appended after
- * the end of the link.
- * @param $prefix String: Optional prefix
- * @param $aprops String: extra attributes to the a-element
- */
- static function makeKnownLink(
- $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = ''
- ) {
- $nt = Title::newFromText( $title );
- if ( $nt instanceof Title ) {
- return self::makeKnownLinkObj( $nt, $text, $query, $trail, $prefix , $aprops );
- } else {
- wfDebug( 'Invalid title passed to self::makeKnownLink(): "' . $title . "\"\n" );
- return $text == '' ? $title : $text;
- }
- }
-