From c2868ebb61db2bec1604af300318cefd246d3dc1 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 27 Dec 2013 16:08:27 +0100 Subject: [PATCH] Remove long deprecated methods from Linker - Linker::makeBrokenLink() (deprecated in 1.16) - Linker::makeBrokenLinkObj() (deprecated in 1.16) - Linker::makeColouredLinkObj() (deprecated in 1.16) - Linker::makeSizeLinkObj() (deprecated in 1.17) Change-Id: I230096cbf964cdff980f33f76790a524d318408d --- RELEASE-NOTES-1.23 | 5 +++ includes/Linker.php | 106 -------------------------------------------- 2 files changed, 5 insertions(+), 106 deletions(-) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 607823442d..b933a3188c 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -100,6 +100,11 @@ production. - LoadBalancer_Single to LoadBalancerSingle - LoadMonitor_MySQL to LoadMonitorMySQL - LoadMonitor_Null to LoadMonitorNull +* Removed methods: + - Linker::makeBrokenLink() (deprecated in 1.16) + - Linker::makeBrokenLinkObj() (deprecated in 1.16) + - Linker::makeColouredLinkObj() (deprecated in 1.16) + - Linker::makeSizeLinkObj() (deprecated in 1.17) === Languages updated in 1.23 === diff --git a/includes/Linker.php b/includes/Linker.php index f303a17ec3..27f8ab4514 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -393,29 +393,6 @@ class Linker { return htmlspecialchars( $target->getPrefixedText() ); } - /** - * Generate either a normal exists-style link or a stub link, depending - * on the given page size. - * - * @param $size Integer - * @param $nt Title object. - * @param $text String - * @param $query String - * @param $trail String - * @param $prefix String - * @return string HTML of link - * @deprecated since 1.17 - */ - static function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { - global $wgUser; - wfDeprecated( __METHOD__, '1.17' ); - - $threshold = $wgUser->getStubThreshold(); - $colour = ( $size < $threshold ) ? 'stub' : ''; - // @todo FIXME: Replace deprecated makeColouredLinkObj by link() - return self::makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix ); - } - /** * Make appropriate markup for a link to the current article. This is currently rendered * as the bold link text. The calling sequence is the same as the other make*LinkObj static functions, @@ -2243,32 +2220,6 @@ class Linker { /* Deprecated methods */ - /** - * @deprecated since 1.16 Use link() - * - * This function is a shortcut to makeBrokenLinkObj(Title::newFromText($title),...). Do not call - * it if you already have a title object handy. See makeBrokenLinkObj for further documentation. - * - * @param string $title The text of the title - * @param string $text Link text - * @param string $query Optional query part - * @param string $trail 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. - * @return string - */ - static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) { - wfDeprecated( __METHOD__, '1.16' ); - - $nt = Title::newFromText( $title ); - if ( $nt instanceof Title ) { - return self::makeBrokenLinkObj( $nt, $text, $query, $trail ); - } else { - wfDebug( 'Invalid title passed to self::makeBrokenLink(): "' . $title . "\"\n" ); - return $text == '' ? $title : $text; - } - } - /** * @deprecated since 1.16 Use link(); warnings since 1.21 * @@ -2342,63 +2293,6 @@ class Linker { return $ret; } - /** - * @deprecated since 1.16 Use link() - * - * Make a red link to the edit page of a given title. - * - * @param $title Title object of the target page - * @param $text String: Link text - * @param string $query Optional query part - * @param string $trail 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 string $prefix Optional prefix - * @return string - */ - static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) { - wfDeprecated( __METHOD__, '1.16' ); - - wfProfileIn( __METHOD__ ); - - list( $inside, $trail ) = self::splitTrail( $trail ); - if ( $text === '' ) { - $text = self::linkText( $title ); - } - - $ret = self::link( $title, "$prefix$text$inside", array(), - wfCgiToArray( $query ), 'broken' ) . $trail; - - wfProfileOut( __METHOD__ ); - return $ret; - } - - /** - * @deprecated since 1.16 Use link() - * - * Make a coloured link. - * - * @param $nt Title object of the target page - * @param $colour Integer: colour of the link - * @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 string $prefix Optional prefix - * @return string - */ - static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) { - wfDeprecated( __METHOD__, '1.16' ); - - if ( $colour != '' ) { - $style = self::getInternalLinkAttributesObj( $nt, $text, $colour ); - } else { - $style = ''; - } - return self::makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style ); - } - /** * Returns the attributes for the tooltip and access key. * @return array -- 2.20.1