r84456 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84455‎ | r84456 | r84457 >
Date:16:15, 21 March 2011
Author:aaron
Status:ok
Tags:
Comment:
Broke some of the more annoying lines
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -158,7 +158,9 @@
159159 * Has compatibility issues on some setups, so avoid wherever possible.
160160 * @return string HTML <a> attribute
161161 */
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+ ) {
163165 wfProfileIn( __METHOD__ );
164166 if ( !$target instanceof Title ) {
165167 wfProfileOut( __METHOD__ );
@@ -219,7 +221,10 @@
220222 /**
221223 * Identical to link(), except $options defaults to 'known'.
222224 */
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+ {
224229 return $this->link( $target, $text, $customAttribs, $query, $options );
225230 }
226231
@@ -452,7 +457,9 @@
453458 * @param $widthOption: Used by the parser to remember the user preference thumbnailsize
454459 * @return String: HTML for an image, with links, wrappers, etc.
455460 */
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+ {
457464 $res = null;
458465 if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$this, &$title,
459466 &$file, &$frameParams, &$handlerParams, &$time, &$res ) ) ) {
@@ -598,7 +605,9 @@
599606 * @param $framed Boolean
600607 * @param $manualthumb String
601608 */
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+ {
603612 $frameParams = array(
604613 'alt' => $alt,
605614 'caption' => $label,
@@ -622,7 +631,9 @@
623632 * @param string $query
624633 * @return mixed
625634 */
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+ {
627638 global $wgStylePath;
628639 $exists = $file && $file->exists();
629640
@@ -843,7 +854,8 @@
844855 $text = htmlspecialchars( $text );
845856 }
846857 $link = '';
847 - $success = wfRunHooks( 'LinkerMakeExternalLink', array( &$url, &$text, &$link, &$attribs, $linktype ) );
 858+ $success = wfRunHooks( 'LinkerMakeExternalLink',
 859+ array( &$url, &$text, &$link, &$attribs, $linktype ) );
848860 if ( !$success ) {
849861 wfDebug( "Hook LinkerMakeExternalLink changed the output of link with url {$url} and text {$text} to {$link}\n", true );
850862 return $link;
@@ -879,7 +891,9 @@
880892 * @param $edits Integer: user edit count (optional, for performance)
881893 * @return String: HTML fragment
882894 */
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+ ) {
884898 global $wgUser, $wgDisableAnonTalk, $wgLang;
885899 $talkable = !( $wgDisableAnonTalk && 0 == $userId );
886900 $blockable = !$flags & self::TOOL_LINKS_NOBLOCK;
@@ -1806,7 +1820,9 @@
18071821 * @param $prefix String: Optional prefix
18081822 * @param $aprops String: extra attributes to the a-element
18091823 */
1810 - function makeKnownLink( $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '' ) {
 1824+ function makeKnownLink(
 1825+ $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = ''
 1826+ ) {
18111827 $nt = Title::newFromText( $title );
18121828 if ( $nt instanceof Title ) {
18131829 return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix , $aprops );
@@ -1909,7 +1925,9 @@
19101926 * @param $style String: style to apply - if empty, use getInternalLinkAttributesObj instead
19111927 * @return the a-element
19121928 */
1913 - function makeKnownLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) {
 1929+ function makeKnownLinkObj(
 1930+ $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
 1931+ ) {
19141932 wfProfileIn( __METHOD__ );
19151933
19161934 if ( $text == '' ) {
@@ -2019,8 +2037,9 @@
20202038 * @param $time String: timestamp of the file, set as false for current
20212039 * @return String
20222040 */
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+ {
20252044 $frameParams = array( 'alt' => $alt, 'caption' => $label );
20262045 if ( $align ) {
20272046 $frameParams['align'] = $align;

Status & tagging log