r79742 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79741‎ | r79742 | r79743 >
Date:18:53, 6 January 2011
Author:happy-melon
Status:ok
Tags:
Comment:
More ancient deprecated functions:
* Linker::postParseLinkColour() - 1.5 (r8662)
* Linker::editSectionLink() and editSectionLinkForOther() - 1.14 (r38161)

Linker::tooltip() and Linker::tooltipWithAccessKey() are old, but still used all over the place.
Modified paths:
  • /trunk/extensions/CategoryMultisort/CategoryMultisort.class.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -332,7 +332,7 @@
333333 * @param $trail String
334334 * @param $prefix String
335335 * @return string HTML of link
336 - * @deprecated
 336+ * @deprecated @since 1.17
337337 */
338338 function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
339339 global $wgUser;
@@ -1732,16 +1732,7 @@
17331733 /* Deprecated methods */
17341734
17351735 /**
1736 - * @deprecated
1737 - */
1738 - function postParseLinkColour( $s = null ) {
1739 - wfDeprecated( __METHOD__ );
1740 - return null;
1741 - }
1742 -
1743 -
1744 - /**
1745 - * @deprecated Use link()
 1736+ * @deprecated @since 1.16 Use link()
17461737 *
17471738 * This function is a shortcut to makeLinkObj(Title::newFromText($title),...). Do not call
17481739 * it if you already have a title object handy. See makeLinkObj for further documentation.
@@ -1768,7 +1759,7 @@
17691760 }
17701761
17711762 /**
1772 - * @deprecated Use link()
 1763+ * @deprecated @since 1.16 Use link()
17731764 *
17741765 * This function is a shortcut to makeKnownLinkObj(Title::newFromText($title),...). Do not call
17751766 * it if you already have a title object handy. See makeKnownLinkObj for further documentation.
@@ -1793,7 +1784,7 @@
17941785 }
17951786
17961787 /**
1797 - * @deprecated Use link()
 1788+ * @deprecated @since 1.16 Use link()
17981789 *
17991790 * This function is a shortcut to makeBrokenLinkObj(Title::newFromText($title),...). Do not call
18001791 * it if you already have a title object handy. See makeBrokenLinkObj for further documentation.
@@ -1816,7 +1807,7 @@
18171808 }
18181809
18191810 /**
1820 - * @deprecated Use link()
 1811+ * @deprecated @since 1.16 Use link()
18211812 *
18221813 * This function is a shortcut to makeStubLinkObj(Title::newFromText($title),...). Do not call
18231814 * it if you already have a title object handy. See makeStubLinkObj for further documentation.
@@ -1840,7 +1831,7 @@
18411832 }
18421833
18431834 /**
1844 - * @deprecated Use link()
 1835+ * @deprecated @since 1.16 Use link()
18451836 *
18461837 * Make a link for a title which may or may not be in the database. If you need to
18471838 * call this lots of times, pre-fill the link cache with a LinkBatch, otherwise each
@@ -1871,7 +1862,7 @@
18721863 }
18731864
18741865 /**
1875 - * @deprecated Use link()
 1866+ * @deprecated @since 1.16 Use link()
18761867 *
18771868 * Make a link for a title which definitely exists. This is faster than makeLinkObj because
18781869 * it doesn't have to do a database query. It's also valid for interwiki titles and special
@@ -1907,7 +1898,7 @@
19081899 }
19091900
19101901 /**
1911 - * @deprecated Use link()
 1902+ * @deprecated @since 1.16 Use link()
19121903 *
19131904 * Make a red link to the edit page of a given title.
19141905 *
@@ -1935,7 +1926,7 @@
19361927 }
19371928
19381929 /**
1939 - * @deprecated Use link()
 1930+ * @deprecated @since 1.16 Use link()
19401931 *
19411932 * Make a brown link to a short article.
19421933 *
@@ -1952,7 +1943,7 @@
19531944 }
19541945
19551946 /**
1956 - * @deprecated Use link()
 1947+ * @deprecated @since 1.16 Use link()
19571948 *
19581949 * Make a coloured link.
19591950 *
@@ -1980,7 +1971,7 @@
19811972
19821973 /**
19831974 * Creates the HTML source for images
1984 - * @deprecated use makeImageLink2
 1975+ * @deprecated @since 1.16 use makeImageLink2
19851976 *
19861977 * @param $title Title object
19871978 * @param $label String: label text
@@ -2024,36 +2015,6 @@
20252016 }
20262017
20272018 /**
2028 - * Used to generate section edit links that point to "other" pages
2029 - * (sections that are really part of included pages).
2030 - *
2031 - * @deprecated use Linker::doEditSectionLink()
2032 - * @param $title Title string.
2033 - * @param $section Integer: section number.
2034 - */
2035 - public function editSectionLinkForOther( $title, $section ) {
2036 - wfDeprecated( __METHOD__ );
2037 - $title = Title::newFromText( $title );
2038 - return $this->doEditSectionLink( $title, $section );
2039 - }
2040 -
2041 - /**
2042 - * @deprecated use Linker::doEditSectionLink()
2043 - * @param $nt Title object.
2044 - * @param $section Integer: section number.
2045 - * @param $hint Link String: title, or default if omitted or empty
2046 - */
2047 - public function editSectionLink( Title $nt, $section, $hint = '' ) {
2048 - wfDeprecated( __METHOD__ );
2049 - if ( $hint === '' ) {
2050 - # No way to pass an actual empty $hint here! The new interface al-
2051 - # lows this, so we have to do this for compatibility.
2052 - $hint = null;
2053 - }
2054 - return $this->doEditSectionLink( $nt, $section, $hint );
2055 - }
2056 -
2057 - /**
20582019 * Returns the attributes for the tooltip and access key.
20592020 */
20602021 public function tooltipAndAccesskeyAttribs( $name ) {
@@ -2075,14 +2036,19 @@
20762037 }
20772038 return $attribs;
20782039 }
 2040+
20792041 /**
2080 - * @deprecated Returns raw bits of HTML, use titleAttrib() and accesskey()
 2042+ * @deprecated @since 1.14
 2043+ * Returns raw bits of HTML, use titleAttrib() and accesskey()
20812044 */
20822045 public function tooltipAndAccesskey( $name ) {
20832046 return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) );
20842047 }
20852048
2086 - /** @deprecated Returns raw bits of HTML, use titleAttrib() */
 2049+ /**
 2050+ * @deprecated @since 1.14
 2051+ * Returns raw bits of HTML, use titleAttrib()
 2052+ */
20872053 public function tooltip( $name, $options = null ) {
20882054 global $wgEnableTooltipsAndAccesskeys;
20892055 if ( !$wgEnableTooltipsAndAccesskeys )
Index: trunk/extensions/CategoryMultisort/CategoryMultisort.class.php
@@ -78,7 +78,7 @@
7979 array(),
8080 array( 'known', 'noclasses' )
8181 ) . '</span>'
82 - : $this->getSkin()->makeSizeLinkObj( $pageLength, $title );
 82+ : $this->getSkin()->link( $title );
8383
8484 $this->articles_start_char[] = $this->decorateSortkey( $sortkey );
8585 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r8662* Deglobalised link placeholder handling by moving the relevant functionality...timstarling07:48, 27 April 2005
r38161Recommit r38149, with the fatal error fixed. The EditSectionLinkForOther hoo...simetrical23:52, 28 July 2008

Status & tagging log