Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98364


Change subject: Avoid repeat of class name when appending in Linker
......................................................................

Avoid repeat of class name when appending in Linker

Simplify the line to make it easier to read, the current way can be read
wrong, see the removed todo.

Change-Id: I71c91acac39b1bacf208c93410da3a2bf576b725
---
M includes/Linker.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/98364/1

diff --git a/includes/Linker.php b/includes/Linker.php
index 895f0f2..450b4ba 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -681,8 +681,7 @@
                                '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;
 
@@ -871,7 +870,7 @@
                        $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 );

-- 
To view, visit https://gerrit.wikimedia.org/r/98364
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71c91acac39b1bacf208c93410da3a2bf576b725
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to