Page MenuHomePhabricator

ImagePage.php.diff

Authored By
bzimport
Nov 21 2014, 8:02 PM
Size
1 KB
Referenced Files
None
Subscribers
None

ImagePage.php.diff

Index: includes/ImagePage.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/ImagePage.php,v
retrieving revision 1.47.2.3
diff -u -p -r1.47.2.3 ImagePage.php
--- includes/ImagePage.php 6 Dec 2004 14:17:53 -0000 1.47.2.3
+++ includes/ImagePage.php 7 Dec 2004 04:43:31 -0000
@@ -42,7 +42,7 @@ class ImagePage extends Article {
{
global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgUseImageResize;
$this->img = Image::newFromTitle( $this->mTitle );
- $url = $this->img->getViewURL();
+ $full_url = $this->img->getViewURL();
$anchoropen = '';
$anchorclose = '';
if ( $wgUseImageResize ) {
@@ -70,20 +70,19 @@ class ImagePage extends Article {
$height = $this->img->getHeight();
$msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
if ( $width > $maxWidth && $wgUseImageResize ) {
- $anchoropen = "<a href=\"{$url}\">";
- $anchorclose = "<br>{$msg}</a>";
-
- $url = $this->img->createThumb( $maxWidth );
$height = floor( $height * $maxWidth / $width );
$width = $maxWidth;
}
if ( $height > $maxHeight && $wgUseImageResize ) {
- $anchoropen = "<a href=\"{$url}\">";
- $anchorclose = "<br>{$msg}</a>";
-
$width = floor( $width * $maxHeight / $height );
$height = $maxHeight;
+ }
+ if ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) {
$url = $this->img->createThumb( $width );
+ $anchoropen = "<a href=\"{$full_url}\">";
+ $anchorclose = "<br>{$msg}</a>";
+ } else {
+ $url = $full_url;
}
$s = "<div class=\"fullImageLink\">" . $anchoropen .
"<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1310
Default Alt Text
ImagePage.php.diff (1 KB)

Event Timeline