";
if ( !$exists ) {
$s .= self::makeBrokenImageLinkObj( $title, $fp['title'], '', '', '', $time == true );
- $zoomIcon = '';
} elseif ( !$thumb ) {
$s .= htmlspecialchars( wfMsg( 'thumbnail_error', '' ) );
- $zoomIcon = '';
} else {
$params = array(
'alt' => $fp['alt'],
'title' => $fp['title'],
'img-class' => 'thumbimage' );
$params = self::getImageLinkMTOParams( $fp, $query ) + $params;
- $s .= $thumb->toHtml( $params );
- if ( isset( $fp['framed'] ) ) {
- $zoomIcon = "";
- } else {
+ $zoomIcon = '';
+ if ( !isset( $fp['framed'] ) ) {
$zoomIcon = Html::rawElement( 'div', array( 'class' => 'magnify' ),
- Html::rawElement( 'a', array(
- 'href' => $url,
- 'class' => 'internal',
- 'title' => wfMsg( 'thumbnail-more' ) ),
- Html::element( 'img', array(
- 'src' => $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
- 'width' => 15,
- 'height' => 11,
- 'alt' => "" ) ) ) );
+ Html::element( 'img', array(
+ 'src' => $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
+ 'width' => 15,
+ 'height' => 11,
+ 'alt' => "" ) ) );
}
+
+ $params['desc-link'] = false;
+ $imgHtml = $thumb->toHtml( $params );
+ $linkAttribs = $thumb->getDescLinkAttribs(empty( $params['title'] ) ? null : $params['title'], $query);
+ $linkHtml = Xml::tags( 'a', $linkAttribs, $imgHtml . $zoomIcon );
+
+ $s .= $linkHtml;
}
- $s .= '
' . $zoomIcon . $fp['caption'] . "