Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -287,9 +287,6 @@ |
288 | 288 | $width = $width_orig; |
289 | 289 | $height_orig = $this->displayImg->getHeight( $page ); |
290 | 290 | $height = $height_orig; |
291 | | - $mustRender = $this->displayImg->getHandler() && |
292 | | - $this->displayImg->getHandler()->mustRender( $this->displayImg ); |
293 | | - $addFullResolutionLink = false; |
294 | 291 | |
295 | 292 | $longDesc = wfMsg( 'parentheses', $this->displayImg->getLongDesc() ); |
296 | 293 | |
— | — | @@ -315,19 +312,14 @@ |
316 | 313 | # Note that $height <= $maxHeight now, but might not be identical |
317 | 314 | # because of rounding. |
318 | 315 | } |
319 | | - |
| 316 | + $msgbig = wfMsgHtml( 'show-big-image' ); |
320 | 317 | $otherSizes = array(); |
321 | 318 | foreach ( $wgImageLimits as $size ) { |
322 | 319 | if ( $size[0] < $width_orig && $size[1] < $height_orig && |
323 | 320 | $size[0] != $width && $size[1] != $height ) { |
324 | 321 | $otherSizes[] = $this->makeSizeLink( $params, $size[0], $size[1] ); |
325 | | - } |
| 322 | + } |
326 | 323 | } |
327 | | - if ( $mustRender ) { |
328 | | - $otherSizes[] = $this->makeSizeLink( $params, $width_orig, $height_orig, 'show-big-image' ); |
329 | | - } else { |
330 | | - $addFullResolutionLink = true; |
331 | | - } |
332 | 324 | $msgsmall = wfMessage( 'show-big-image-preview' )-> |
333 | 325 | rawParams( $this->makeSizeLink( $params, $width, $height ) )-> |
334 | 326 | parse() . ' ' . |
— | — | @@ -355,7 +347,7 @@ |
356 | 348 | if ( $thumbnail ) { |
357 | 349 | $options = array( |
358 | 350 | 'alt' => $this->displayImg->getTitle()->getPrefixedText(), |
359 | | - 'file-link' => !$mustRender, |
| 351 | + 'file-link' => true, |
360 | 352 | ); |
361 | 353 | $wgOut->addHTML( '<div class="fullImageLink" id="file">' . |
362 | 354 | $thumbnail->toHtml( $options ) . |
— | — | @@ -436,8 +428,8 @@ |
437 | 429 | if ( $showLink ) { |
438 | 430 | $filename = wfEscapeWikiText( $this->displayImg->getName() ); |
439 | 431 | $linktext = $filename; |
440 | | - if ( $addFullResolutionLink ) { |
441 | | - $linktext = wfMsg( 'show-big-image' ); |
| 432 | + if ( isset( $msgbig ) ) { |
| 433 | + $linktext = wfEscapeWikiText( $msgbig ); |
442 | 434 | } |
443 | 435 | $medialink = "[[Media:$filename|$linktext]]"; |
444 | 436 | |
— | — | @@ -492,7 +484,7 @@ |
493 | 485 | * @param int $width |
494 | 486 | * @param int $height |
495 | 487 | */ |
496 | | - private function makeSizeLink( $params, $width, $height, $msg = 'show-big-image-size' ) { |
| 488 | + private function makeSizeLink( $params, $width, $height ) { |
497 | 489 | $params['width'] = $width; |
498 | 490 | $params['height'] = $height; |
499 | 491 | $thumbnail = $this->displayImg->transform( $params ); |
— | — | @@ -500,7 +492,7 @@ |
501 | 493 | return Html::rawElement( 'a', array( |
502 | 494 | 'href' => $thumbnail->getUrl(), |
503 | 495 | 'class' => 'mw-thumbnail-link' |
504 | | - ), wfMessage( $msg )->numParams( |
| 496 | + ), wfMessage( 'show-big-image-size' )->numParams( |
505 | 497 | $thumbnail->getWidth(), $thumbnail->getHeight() |
506 | 498 | )->parse() ); |
507 | 499 | } else { |