Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -364,20 +364,15 @@ |
365 | 365 | ); |
366 | 366 | } else { |
367 | 367 | # Image is small enough to show full size on image page |
368 | | - $msgbig = htmlspecialchars( $this->displayImg->getName() ); |
369 | 368 | $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) ); |
370 | 369 | } |
371 | 370 | |
372 | 371 | $params['width'] = $width; |
373 | 372 | $thumbnail = $this->displayImg->transform( $params ); |
374 | 373 | |
375 | | - $anchorclose = "<br />"; |
376 | | - if ( $this->displayImg->mustRender() ) { |
377 | | - $showLink = true; |
378 | | - } else { |
379 | | - $anchorclose .= |
380 | | - $msgsmall . |
381 | | - '<br />' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc; |
| 374 | + $showLink = true; |
| 375 | + if ( !$this->displayImg->mustRender() ) { |
| 376 | + $anchorclose = "<br />" . $msgsmall; |
382 | 377 | } |
383 | 378 | |
384 | 379 | $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1; |
— | — | @@ -469,7 +464,11 @@ |
470 | 465 | |
471 | 466 | if ( $showLink ) { |
472 | 467 | $filename = wfEscapeWikiText( $this->displayImg->getName() ); |
473 | | - $medialink = "[[Media:$filename|$filename]]"; |
| 468 | + $linktext = $filename; |
| 469 | + if ( isset( $msgbig ) ) { |
| 470 | + $linktext = wfEscapeWikiText( $msgbig ); |
| 471 | + } |
| 472 | + $medialink = "[[Media:$filename|$linktext]]"; |
474 | 473 | |
475 | 474 | if ( !$this->displayImg->isSafeFile() ) { |
476 | 475 | $warning = wfMsgNoTrans( 'mediawarning' ); |