X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=7c6bbc60351d4ab67bec1c10845c34a9716b8266;hb=855e3626e3aac639fa754aa17a8e5a6f5b533f25;hp=895f0f25a0557981400680ddfddad4b9bb892cec;hpb=3c5c0c834185709197e806405778c870b95b477a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index 895f0f25a0..7c6bbc6035 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -264,8 +264,8 @@ class Linker { */ public static function linkKnown( $target, $html = null, $customAttribs = array(), - $query = array(), $options = array( 'known', 'noclasses' ) ) - { + $query = array(), $options = array( 'known', 'noclasses' ) + ) { return self::link( $target, $html, $customAttribs, $query, $options ); } @@ -562,8 +562,8 @@ class Linker { * @return String: HTML for an image, with links, wrappers, etc. */ public static function makeImageLink( /*Parser*/ $parser, Title $title, $file, $frameParams = array(), - $handlerParams = array(), $time = false, $query = "", $widthOption = null ) - { + $handlerParams = array(), $time = false, $query = "", $widthOption = null + ) { $res = null; $dummy = new DummyLinker; if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$dummy, &$title, @@ -681,8 +681,7 @@ class Linker { 'valign' => isset( $fp['valign'] ) ? $fp['valign'] : false, 'img-class' => $fp['class'] ); if ( isset( $fp['border'] ) ) { - // TODO: BUG? Both values are identical - $params['img-class'] .= ( $params['img-class'] !== '' ) ? ' thumbborder' : 'thumbborder'; + $params['img-class'] .= ( $params['img-class'] !== '' ? ' ' : '' ) . 'thumbborder'; } $params = self::getImageLinkMTOParams( $fp, $query, $parser ) + $params; @@ -750,8 +749,8 @@ class Linker { * @return mixed */ public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt, - $align = 'right', $params = array(), $framed = false, $manualthumb = "" ) - { + $align = 'right', $params = array(), $framed = false, $manualthumb = "" + ) { $frameParams = array( 'alt' => $alt, 'caption' => $label, @@ -776,8 +775,8 @@ class Linker { * @return mixed */ public static function makeThumbLink2( Title $title, $file, $frameParams = array(), - $handlerParams = array(), $time = false, $query = "" ) - { + $handlerParams = array(), $time = false, $query = "" + ) { global $wgStylePath, $wgContLang; $exists = $file && $file->exists(); @@ -850,10 +849,10 @@ class Linker { if ( $page ) { $url = wfAppendQuery( $url, array( 'page' => $page ) ); } - if ( $manualthumb && - !isset( $fp['link-title'] ) && - !isset( $fp['link-url'] ) && - !isset( $fp['no-link'] ) ) { + if ( $manualthumb + && !isset( $fp['link-title'] ) + && !isset( $fp['link-url'] ) + && !isset( $fp['no-link'] ) ) { $fp['link-url'] = $url; } @@ -871,7 +870,7 @@ class Linker { $params = array( 'alt' => $fp['alt'], 'title' => $fp['title'], - 'img-class' => ( isset( $fp['class'] ) && $fp['class'] !== '' ) ? $fp['class'] . ' thumbimage' : 'thumbimage' + 'img-class' => ( isset( $fp['class'] ) && $fp['class'] !== '' ? $fp['class'] . ' ' : '' ) . 'thumbimage' ); $params = self::getImageLinkMTOParams( $fp, $query ) + $params; $s .= $thumb->toHtml( $params ); @@ -1471,8 +1470,8 @@ class Linker { $target = Title::newFromText( $linkTarget ); if ( $target ) { if ( $target->getText() == '' && $target->getInterwiki() === '' - && !self::$commentLocal && self::$commentContextTitle ) - { + && !self::$commentLocal && self::$commentContextTitle + ) { $newTarget = clone ( self::$commentContextTitle ); $newTarget->setFragment( '#' . $target->getFragment() ); $target = $newTarget;