r99917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99916‎ | r99917 | r99918 >
Date:21:40, 15 October 2011
Author:btongminh
Status:ok
Tags:
Comment:
Revert unrelated changes from r99916
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -287,9 +287,6 @@
288288 $width = $width_orig;
289289 $height_orig = $this->displayImg->getHeight( $page );
290290 $height = $height_orig;
291 - $mustRender = $this->displayImg->getHandler() &&
292 - $this->displayImg->getHandler()->mustRender( $this->displayImg );
293 - $addFullResolutionLink = false;
294291
295292 $longDesc = wfMsg( 'parentheses', $this->displayImg->getLongDesc() );
296293
@@ -315,19 +312,14 @@
316313 # Note that $height <= $maxHeight now, but might not be identical
317314 # because of rounding.
318315 }
319 -
 316+ $msgbig = wfMsgHtml( 'show-big-image' );
320317 $otherSizes = array();
321318 foreach ( $wgImageLimits as $size ) {
322319 if ( $size[0] < $width_orig && $size[1] < $height_orig &&
323320 $size[0] != $width && $size[1] != $height ) {
324321 $otherSizes[] = $this->makeSizeLink( $params, $size[0], $size[1] );
325 - }
 322+ }
326323 }
327 - if ( $mustRender ) {
328 - $otherSizes[] = $this->makeSizeLink( $params, $width_orig, $height_orig, 'show-big-image' );
329 - } else {
330 - $addFullResolutionLink = true;
331 - }
332324 $msgsmall = wfMessage( 'show-big-image-preview' )->
333325 rawParams( $this->makeSizeLink( $params, $width, $height ) )->
334326 parse() . ' ' .
@@ -355,7 +347,7 @@
356348 if ( $thumbnail ) {
357349 $options = array(
358350 'alt' => $this->displayImg->getTitle()->getPrefixedText(),
359 - 'file-link' => !$mustRender,
 351+ 'file-link' => true,
360352 );
361353 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
362354 $thumbnail->toHtml( $options ) .
@@ -436,8 +428,8 @@
437429 if ( $showLink ) {
438430 $filename = wfEscapeWikiText( $this->displayImg->getName() );
439431 $linktext = $filename;
440 - if ( $addFullResolutionLink ) {
441 - $linktext = wfMsg( 'show-big-image' );
 432+ if ( isset( $msgbig ) ) {
 433+ $linktext = wfEscapeWikiText( $msgbig );
442434 }
443435 $medialink = "[[Media:$filename|$linktext]]";
444436
@@ -492,7 +484,7 @@
493485 * @param int $width
494486 * @param int $height
495487 */
496 - private function makeSizeLink( $params, $width, $height, $msg = 'show-big-image-size' ) {
 488+ private function makeSizeLink( $params, $width, $height ) {
497489 $params['width'] = $width;
498490 $params['height'] = $height;
499491 $thumbnail = $this->displayImg->transform( $params );
@@ -500,7 +492,7 @@
501493 return Html::rawElement( 'a', array(
502494 'href' => $thumbnail->getUrl(),
503495 'class' => 'mw-thumbnail-link'
504 - ), wfMessage( $msg )->numParams(
 496+ ), wfMessage( 'show-big-image-size' )->numParams(
505497 $thumbnail->getWidth(), $thumbnail->getHeight()
506498 )->parse() );
507499 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r104389MFT VipsScaler dependencies r99911, r99916, r99917, r101677, r104386, r104387...tstarling05:04, 28 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99916Follow-up r99911: fix tests...btongminh21:38, 15 October 2011

Status & tagging log