From: Derk-Jan Hartman Date: Wed, 27 Oct 2010 01:50:07 +0000 (+0000) Subject: Make the image page more consistent. Now all pages will have the fullMedia div. ... X-Git-Tag: 1.31.0-rc.0~34279 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8c6db5089648cd4c69b49a44681333f7257e1ed4;p=lhc%2Fweb%2Fwiklou.git Make the image page more consistent. Now all pages will have the fullMedia div. (with link, and file description) Perhaps we should move the "Size of this preview:" and "No higher resolution available" markers into that div as well ? Feedback welcome. --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 06cc5f3762..e9be037009 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -364,20 +364,15 @@ class ImagePage extends Article { ); } else { # Image is small enough to show full size on image page - $msgbig = htmlspecialchars( $this->displayImg->getName() ); $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) ); } $params['width'] = $width; $thumbnail = $this->displayImg->transform( $params ); - $anchorclose = "
"; - if ( $this->displayImg->mustRender() ) { - $showLink = true; - } else { - $anchorclose .= - $msgsmall . - '
' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc; + $showLink = true; + if ( !$this->displayImg->mustRender() ) { + $anchorclose = "
" . $msgsmall; } $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1; @@ -469,7 +464,11 @@ class ImagePage extends Article { if ( $showLink ) { $filename = wfEscapeWikiText( $this->displayImg->getName() ); - $medialink = "[[Media:$filename|$filename]]"; + $linktext = $filename; + if ( isset( $msgbig ) ) { + $linktext = wfEscapeWikiText( $msgbig ); + } + $medialink = "[[Media:$filename|$linktext]]"; if ( !$this->displayImg->isSafeFile() ) { $warning = wfMsgNoTrans( 'mediawarning' );