Index: trunk/phase3/includes/Linker.php |
— | — | @@ -317,6 +317,8 @@ |
318 | 318 | * Default text of the links to the Title $target |
319 | 319 | * |
320 | 320 | * @param $target Title |
| 321 | + * |
| 322 | + * @return string |
321 | 323 | */ |
322 | 324 | private static function linkText( $target ) { |
323 | 325 | # We might be passed a non-Title by make*LinkObj(). Fail gracefully. |
— | — | @@ -361,6 +363,8 @@ |
362 | 364 | * despite $query not being used. |
363 | 365 | * |
364 | 366 | * @param $nt Title |
| 367 | + * |
| 368 | + * @return string |
365 | 369 | */ |
366 | 370 | static function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
367 | 371 | if ( $text == '' ) { |
— | — | @@ -370,6 +374,10 @@ |
371 | 375 | return "<strong class=\"selflink\">{$prefix}{$text}{$inside}</strong>{$trail}"; |
372 | 376 | } |
373 | 377 | |
| 378 | + /** |
| 379 | + * @param $title Title |
| 380 | + * @return Title |
| 381 | + */ |
374 | 382 | static function normaliseSpecialPage( Title $title ) { |
375 | 383 | if ( $title->getNamespace() == NS_SPECIAL ) { |
376 | 384 | list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $title->getDBkey() ); |
— | — | @@ -387,6 +395,10 @@ |
388 | 396 | /** |
389 | 397 | * Returns the filename part of an url. |
390 | 398 | * Used as alternative text for external images. |
| 399 | + * |
| 400 | + * @param $url string |
| 401 | + * |
| 402 | + * @return string |
391 | 403 | */ |
392 | 404 | static function fnamePart( $url ) { |
393 | 405 | $basename = strrchr( $url, '/' ); |
— | — | @@ -401,6 +413,11 @@ |
402 | 414 | /** |
403 | 415 | * Return the code for images which were added via external links, |
404 | 416 | * via Parser::maybeMakeExternalImage(). |
| 417 | + * |
| 418 | + * @param $url |
| 419 | + * @param $alt |
| 420 | + * |
| 421 | + * @return string |
405 | 422 | */ |
406 | 423 | static function makeExternalImage( $url, $alt = '' ) { |
407 | 424 | if ( $alt == '' ) { |
— | — | @@ -1740,60 +1757,6 @@ |
1741 | 1758 | /** |
1742 | 1759 | * @deprecated since 1.16 Use link() |
1743 | 1760 | * |
1744 | | - * This function is a shortcut to makeLinkObj(Title::newFromText($title),...). Do not call |
1745 | | - * it if you already have a title object handy. See makeLinkObj for further documentation. |
1746 | | - * |
1747 | | - * @param $title String: the text of the title |
1748 | | - * @param $text String: link text |
1749 | | - * @param $query String: optional query part |
1750 | | - * @param $trail String: optional trail. Alphabetic characters at the start of this string will |
1751 | | - * be included in the link text. Other characters will be appended after |
1752 | | - * the end of the link. |
1753 | | - */ |
1754 | | - static function makeLink( $title, $text = '', $query = '', $trail = '' ) { |
1755 | | - wfProfileIn( __METHOD__ ); |
1756 | | - $nt = Title::newFromText( $title ); |
1757 | | - if ( $nt instanceof Title ) { |
1758 | | - $result = self::makeLinkObj( $nt, $text, $query, $trail ); |
1759 | | - } else { |
1760 | | - wfDebug( 'Invalid title passed to self::makeLink(): "' . $title . "\"\n" ); |
1761 | | - $result = $text == "" ? $title : $text; |
1762 | | - } |
1763 | | - |
1764 | | - wfProfileOut( __METHOD__ ); |
1765 | | - return $result; |
1766 | | - } |
1767 | | - |
1768 | | - /** |
1769 | | - * @deprecated since 1.16 Use link() |
1770 | | - * |
1771 | | - * This function is a shortcut to makeKnownLinkObj(Title::newFromText($title),...). Do not call |
1772 | | - * it if you already have a title object handy. See makeKnownLinkObj for further documentation. |
1773 | | - * |
1774 | | - * @param $title String: the text of the title |
1775 | | - * @param $text String: link text |
1776 | | - * @param $query String: optional query part |
1777 | | - * @param $trail String: optional trail. Alphabetic characters at the start of this string will |
1778 | | - * be included in the link text. Other characters will be appended after |
1779 | | - * the end of the link. |
1780 | | - * @param $prefix String: Optional prefix |
1781 | | - * @param $aprops String: extra attributes to the a-element |
1782 | | - */ |
1783 | | - static function makeKnownLink( |
1784 | | - $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '' |
1785 | | - ) { |
1786 | | - $nt = Title::newFromText( $title ); |
1787 | | - if ( $nt instanceof Title ) { |
1788 | | - return self::makeKnownLinkObj( $nt, $text, $query, $trail, $prefix , $aprops ); |
1789 | | - } else { |
1790 | | - wfDebug( 'Invalid title passed to self::makeKnownLink(): "' . $title . "\"\n" ); |
1791 | | - return $text == '' ? $title : $text; |
1792 | | - } |
1793 | | - } |
1794 | | - |
1795 | | - /** |
1796 | | - * @deprecated since 1.16 Use link() |
1797 | | - * |
1798 | 1761 | * This function is a shortcut to makeBrokenLinkObj(Title::newFromText($title),...). Do not call |
1799 | 1762 | * it if you already have a title object handy. See makeBrokenLinkObj for further documentation. |
1800 | 1763 | * |
— | — | @@ -1914,23 +1877,6 @@ |
1915 | 1878 | /** |
1916 | 1879 | * @deprecated since 1.16 Use link() |
1917 | 1880 | * |
1918 | | - * Make a brown link to a short article. |
1919 | | - * |
1920 | | - * @param $nt Title object of the target page |
1921 | | - * @param $text String: link text |
1922 | | - * @param $query String: optional query part |
1923 | | - * @param $trail String: optional trail. Alphabetic characters at the start of this string will |
1924 | | - * be included in the link text. Other characters will be appended after |
1925 | | - * the end of the link. |
1926 | | - * @param $prefix String: Optional prefix |
1927 | | - */ |
1928 | | - static function makeStubLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1929 | | - return self::makeColouredLinkObj( $nt, 'stub', $text, $query, $trail, $prefix ); |
1930 | | - } |
1931 | | - |
1932 | | - /** |
1933 | | - * @deprecated since 1.16 Use link() |
1934 | | - * |
1935 | 1881 | * Make a coloured link. |
1936 | 1882 | * |
1937 | 1883 | * @param $nt Title object of the target page |