Index: trunk/phase3/includes/Linker.php |
— | — | @@ -158,7 +158,9 @@ |
159 | 159 | * Has compatibility issues on some setups, so avoid wherever possible. |
160 | 160 | * @return string HTML <a> attribute |
161 | 161 | */ |
162 | | - public function link( $target, $text = null, $customAttribs = array(), $query = array(), $options = array() ) { |
| 162 | + public function link( |
| 163 | + $target, $text = null, $customAttribs = array(), $query = array(), $options = array() |
| 164 | + ) { |
163 | 165 | wfProfileIn( __METHOD__ ); |
164 | 166 | if ( !$target instanceof Title ) { |
165 | 167 | wfProfileOut( __METHOD__ ); |
— | — | @@ -219,7 +221,10 @@ |
220 | 222 | /** |
221 | 223 | * Identical to link(), except $options defaults to 'known'. |
222 | 224 | */ |
223 | | - public function linkKnown( $target, $text = null, $customAttribs = array(), $query = array(), $options = array( 'known', 'noclasses' ) ) { |
| 225 | + public function linkKnown( |
| 226 | + $target, $text = null, $customAttribs = array(), |
| 227 | + $query = array(), $options = array( 'known', 'noclasses' ) ) |
| 228 | + { |
224 | 229 | return $this->link( $target, $text, $customAttribs, $query, $options ); |
225 | 230 | } |
226 | 231 | |
— | — | @@ -452,7 +457,9 @@ |
453 | 458 | * @param $widthOption: Used by the parser to remember the user preference thumbnailsize |
454 | 459 | * @return String: HTML for an image, with links, wrappers, etc. |
455 | 460 | */ |
456 | | - function makeImageLink2( Title $title, $file, $frameParams = array(), $handlerParams = array(), $time = false, $query = "", $widthOption = null ) { |
| 461 | + function makeImageLink2( Title $title, $file, $frameParams = array(), |
| 462 | + $handlerParams = array(), $time = false, $query = "", $widthOption = null ) |
| 463 | + { |
457 | 464 | $res = null; |
458 | 465 | if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$this, &$title, |
459 | 466 | &$file, &$frameParams, &$handlerParams, &$time, &$res ) ) ) { |
— | — | @@ -598,7 +605,9 @@ |
599 | 606 | * @param $framed Boolean |
600 | 607 | * @param $manualthumb String |
601 | 608 | */ |
602 | | - function makeThumbLinkObj( Title $title, $file, $label = '', $alt, $align = 'right', $params = array(), $framed = false , $manualthumb = "" ) { |
| 609 | + function makeThumbLinkObj( Title $title, $file, $label = '', $alt, |
| 610 | + $align = 'right', $params = array(), $framed = false , $manualthumb = "" ) |
| 611 | + { |
603 | 612 | $frameParams = array( |
604 | 613 | 'alt' => $alt, |
605 | 614 | 'caption' => $label, |
— | — | @@ -622,7 +631,9 @@ |
623 | 632 | * @param string $query |
624 | 633 | * @return mixed |
625 | 634 | */ |
626 | | - function makeThumbLink2( Title $title, $file, $frameParams = array(), $handlerParams = array(), $time = false, $query = "" ) { |
| 635 | + function makeThumbLink2( Title $title, $file, $frameParams = array(), |
| 636 | + $handlerParams = array(), $time = false, $query = "" ) |
| 637 | + { |
627 | 638 | global $wgStylePath; |
628 | 639 | $exists = $file && $file->exists(); |
629 | 640 | |
— | — | @@ -843,7 +854,8 @@ |
844 | 855 | $text = htmlspecialchars( $text ); |
845 | 856 | } |
846 | 857 | $link = ''; |
847 | | - $success = wfRunHooks( 'LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs, $linktype ) ); |
| 858 | + $success = wfRunHooks( 'LinkerMakeExternalLink', |
| 859 | + array( &$url, &$text, &$link, &$attribs, $linktype ) ); |
848 | 860 | if ( !$success ) { |
849 | 861 | wfDebug( "Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}\n", true ); |
850 | 862 | return $link; |
— | — | @@ -879,7 +891,9 @@ |
880 | 892 | * @param $edits Integer: user edit count (optional, for performance) |
881 | 893 | * @return String: HTML fragment |
882 | 894 | */ |
883 | | - public function userToolLinks( $userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null ) { |
| 895 | + public function userToolLinks( |
| 896 | + $userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null |
| 897 | + ) { |
884 | 898 | global $wgUser, $wgDisableAnonTalk, $wgLang; |
885 | 899 | $talkable = !( $wgDisableAnonTalk && 0 == $userId ); |
886 | 900 | $blockable = !$flags & self::TOOL_LINKS_NOBLOCK; |
— | — | @@ -1806,7 +1820,9 @@ |
1807 | 1821 | * @param $prefix String: Optional prefix |
1808 | 1822 | * @param $aprops String: extra attributes to the a-element |
1809 | 1823 | */ |
1810 | | - function makeKnownLink( $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '' ) { |
| 1824 | + function makeKnownLink( |
| 1825 | + $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '' |
| 1826 | + ) { |
1811 | 1827 | $nt = Title::newFromText( $title ); |
1812 | 1828 | if ( $nt instanceof Title ) { |
1813 | 1829 | return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix , $aprops ); |
— | — | @@ -1909,7 +1925,9 @@ |
1910 | 1926 | * @param $style String: style to apply - if empty, use getInternalLinkAttributesObj instead |
1911 | 1927 | * @return the a-element |
1912 | 1928 | */ |
1913 | | - function makeKnownLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) { |
| 1929 | + function makeKnownLinkObj( |
| 1930 | + $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' |
| 1931 | + ) { |
1914 | 1932 | wfProfileIn( __METHOD__ ); |
1915 | 1933 | |
1916 | 1934 | if ( $text == '' ) { |
— | — | @@ -2019,8 +2037,9 @@ |
2020 | 2038 | * @param $time String: timestamp of the file, set as false for current |
2021 | 2039 | * @return String |
2022 | 2040 | */ |
2023 | | - function makeImageLinkObj( $title, $label, $alt, $align = '', $handlerParams = array(), $framed = false, |
2024 | | - $thumb = false, $manualthumb = '', $valign = '', $time = false ) { |
| 2041 | + function makeImageLinkObj( $title, $label, $alt, $align = '', $handlerParams = array(), |
| 2042 | + $framed = false, $thumb = false, $manualthumb = '', $valign = '', $time = false ) |
| 2043 | + { |
2025 | 2044 | $frameParams = array( 'alt' => $alt, 'caption' => $label ); |
2026 | 2045 | if ( $align ) { |
2027 | 2046 | $frameParams['align'] = $align; |