Page MenuHomePhabricator

A bug in ImagePage.php
Closed, ResolvedPublic

Description

Author: kalsingh

Description:
There is a problem with the ImagePage.php file.

$img is undefined, whereas $this->img is defined. Changed two lines of code, the
patch is below.

  • wiki/mediawiki-1.5.0/includes/ImagePage.php 2005-09-13 11:28:03.000000000 +1000

+++ wiki-patched/mediawiki-1.5.0/includes/ImagePage.php 2005-10-19
10:03:30.000000000 +1000
@@ -172,14 +172,14 @@

if( $wgUseImageResize ) {
        $thumbnail =

$this->img->getThumbnail( $width );

if ( $thumbnail == null ) {
  • $url = $img->getViewURL();

+ $url =
$this->img->getViewURL();

        } else {
                $url = $thumbnail->getURL();
        }
} else {
        # No resize ability? Show the

full image, but scale

  1. it down in the browser so it

fits on the page.

  • $url = $img->getViewURL();

+ $url = $this->img->getViewURL();

}
$anchoropen  = "<a href=\"{$full_url}\">";
$anchorclose = "</a><br />";

Version: 1.5.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz3740

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:52 PM
bzimport set Reference to bz3740.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of 3643 ***

kalsingh wrote:

Patch to fix the problem

Decided to add the patch as an attachment, since putting it in the comment made
it unreadable.

Attached: