r21673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r21672‎ | r21673 | r21674 >
Date:22:04, 27 April 2007
Author:raymond
Status:old
Tags:
Comment:
Fix regression, broken since r21411:
Wrong messages were shown beneath small images at image description page.
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
——@@ -208,7 +208,6 @@
209209 # image
210210
211211 # "Download high res version" link below the image
212 - $msgbig = wfMsgHtml('show-big-image');
213212 $msgsize = wfMsgHtml('file-info-size', $width_orig, $height_orig, $sk->formatSize( $this->img->getSize() ), $mime );
214213 # We'll show a thumbnail of this image
215214 if ( $width > $maxWidth || $height > $maxHeight ) {
——@@ -225,7 +224,14 @@
226225 # Note that $height <= $maxHeight now, but might not be identical
227226 # because of rounding.
228227 }
 228+ $msgbig = wfMsgHtml('show-big-image');
 229+ $msgsmall = wfMsg('show-big-image-thumb', $width, $height );
 230+ } else {
 231+ # Image is small enough to show full size on image page
 232+ $msgbig = $this->img->getName();
 233+ $msgsmall = wfMsg( 'file-nohires' );
229234 }
 235+
230236 $params['width'] = $width;
231237 $thumbnail = $this->img->transform( $params );
232238
——@@ -234,7 +240,7 @@
235241 $showLink = true;
236242 } else {
237243 $anchorclose .=
238 - wfMsg('show-big-image-thumb', $width, $height ) .
 244+ $msgsmall .
239245 '<br />' . Xml::tags( 'a', $linkAttribs, $msgbig ) . ' ' . $msgsize;
240246 }
241247
——@@ -317,13 +323,6 @@
318324 // Check for MIME type. Other types may have more information in the future.
319325 if (substr($mime,0,9) == 'image/svg' ) {
320326 $infores = wfMsg('file-svg', $width_orig, $height_orig ) . '<br />';
321 - } elseif ( substr($mime,0,5) == 'image' ) {
322 - $infores = wfMsg('file-nohires') . '<br />';
323 - $info = wfMsg(
324 - 'file-info-size',
325 - $width_orig, $height_orig,
326 - $sk->formatSize( $this->img->getSize() ),
327 - $mime );
328327 }
329328
330329 global $wgContLang;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r21411* Introduced media handler modules for file-type specific operations: thumbna...tstarling12:31, 20 April 2007