r6561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6560‎ | r6561 | r6562 >
Date:21:09, 7 December 2004
Author:jeluf
Status:old
Tags:
Comment:
(bug 1024) Fix link to high-res image version on Image: pages
Modified paths:
  • /branches/REL1_4/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_4/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/ImagePage.php
@@ -42,7 +42,7 @@
4343 {
4444 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize;
4545 $this->img = Image::newFromTitle( $this->mTitle );
46 - $url = $this->img->getViewURL();
 46+ $full_url = $this->img->getViewURL();
4747 $anchoropen = '';
4848 $anchorclose = '';
4949 if ( $wgUseImageResize ) {
@@ -70,26 +70,25 @@
7171 $height = $this->img->getHeight();
7272 $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
7373 if ( $width > $maxWidth && $wgUseImageResize ) {
74 - $anchoropen = "<a href=\"{$url}\">";
75 - $anchorclose = "<br>{$msg}</a>";
76 -
77 - $url = $this->img->createThumb( $maxWidth );
7874 $height = floor( $height * $maxWidth / $width );
7975 $width = $maxWidth;
8076 }
8177 if ( $height > $maxHeight && $wgUseImageResize ) {
82 - $anchoropen = "<a href=\"{$url}\">";
83 - $anchorclose = "<br>{$msg}</a>";
84 -
8578 $width = floor( $width * $maxHeight / $height );
8679 $height = $maxHeight;
 80+ }
 81+ if ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) {
8782 $url = $this->img->createThumb( $width );
 83+ $anchoropen = "<a href=\"{$full_url}\">";
 84+ $anchorclose = "<br>{$msg}</a>";
 85+ } else {
 86+ $url = $full_url;
8887 }
89 - $s = "<div class=\"fullImageLink\">" . $anchoropen .
 88+ $s = '<div class="fullImageLink">' . $anchoropen .
9089 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
91 - htmlspecialchars( $wgRequest->getVal( 'image' ) )."\" />" . $anchorclose . "</div>";
 90+ htmlspecialchars( $wgRequest->getVal( 'image' ) ).'" />' . $anchorclose . '</div>';
9291 } else {
93 - $s = "<div class=\"fullMedia\">".$sk->makeMediaLink($this->img->getName(),"")."</div>";
 92+ $s = "<div class=\"fullMedia\">" . $sk->makeMediaLink( $this->img->getName(),'' ) . '</div>';
9493 }
9594 $wgOut->addHTML( $s );
9695 if($this->img->fromSharedDirectory) {
Index: branches/REL1_4/phase3/RELEASE-NOTES
@@ -109,6 +109,7 @@
110110 * (bug 1014) Missing image size option on old accounts handled gracefully
111111 * (bug 1027) Fix page moves with table prefix
112112 * (bug 1018) Some pages fail with stub threshold enabled
 113+* (bug 1024) Fix link to high-res image version on Image: pages
113114
114115
115116 === Caveats ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r6562(bug 1024) Fix link to high-res image version on Image: pagesjeluf21:19, 7 December 2004

Status & tagging log