Index: branches/REL1_4/phase3/includes/ImagePage.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | { |
44 | 44 | global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize; |
45 | 45 | $this->img = Image::newFromTitle( $this->mTitle ); |
46 | | - $url = $this->img->getViewURL(); |
| 46 | + $full_url = $this->img->getViewURL(); |
47 | 47 | $anchoropen = ''; |
48 | 48 | $anchorclose = ''; |
49 | 49 | if ( $wgUseImageResize ) { |
— | — | @@ -70,26 +70,25 @@ |
71 | 71 | $height = $this->img->getHeight(); |
72 | 72 | $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) ); |
73 | 73 | if ( $width > $maxWidth && $wgUseImageResize ) { |
74 | | - $anchoropen = "<a href=\"{$url}\">"; |
75 | | - $anchorclose = "<br>{$msg}</a>"; |
76 | | - |
77 | | - $url = $this->img->createThumb( $maxWidth ); |
78 | 74 | $height = floor( $height * $maxWidth / $width ); |
79 | 75 | $width = $maxWidth; |
80 | 76 | } |
81 | 77 | if ( $height > $maxHeight && $wgUseImageResize ) { |
82 | | - $anchoropen = "<a href=\"{$url}\">"; |
83 | | - $anchorclose = "<br>{$msg}</a>"; |
84 | | - |
85 | 78 | $width = floor( $width * $maxHeight / $height ); |
86 | 79 | $height = $maxHeight; |
| 80 | + } |
| 81 | + if ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) { |
87 | 82 | $url = $this->img->createThumb( $width ); |
| 83 | + $anchoropen = "<a href=\"{$full_url}\">"; |
| 84 | + $anchorclose = "<br>{$msg}</a>"; |
| 85 | + } else { |
| 86 | + $url = $full_url; |
88 | 87 | } |
89 | | - $s = "<div class=\"fullImageLink\">" . $anchoropen . |
| 88 | + $s = '<div class="fullImageLink">' . $anchoropen . |
90 | 89 | "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" . |
91 | | - htmlspecialchars( $wgRequest->getVal( 'image' ) )."\" />" . $anchorclose . "</div>"; |
| 90 | + htmlspecialchars( $wgRequest->getVal( 'image' ) ).'" />' . $anchorclose . '</div>'; |
92 | 91 | } else { |
93 | | - $s = "<div class=\"fullMedia\">".$sk->makeMediaLink($this->img->getName(),"")."</div>"; |
| 92 | + $s = "<div class=\"fullMedia\">" . $sk->makeMediaLink( $this->img->getName(),'' ) . '</div>'; |
94 | 93 | } |
95 | 94 | $wgOut->addHTML( $s ); |
96 | 95 | if($this->img->fromSharedDirectory) { |
Index: branches/REL1_4/phase3/RELEASE-NOTES |
— | — | @@ -109,6 +109,7 @@ |
110 | 110 | * (bug 1014) Missing image size option on old accounts handled gracefully |
111 | 111 | * (bug 1027) Fix page moves with table prefix |
112 | 112 | * (bug 1018) Some pages fail with stub threshold enabled |
| 113 | +* (bug 1024) Fix link to high-res image version on Image: pages |
113 | 114 | |
114 | 115 | |
115 | 116 | === Caveats === |