Last modified: 2010-05-15 15:37:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5740, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3740 - A bug in ImagePage.php
A bug in ImagePage.php
Status: RESOLVED DUPLICATE of bug 3643
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.5.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-19 00:06 UTC by Kalvinder Singh
Modified: 2010-05-15 15:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to fix the problem (755 bytes, patch)
2005-10-19 00:10 UTC, Kalvinder Singh
Details

Description Kalvinder Singh 2005-10-19 00:06:56 UTC
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
                                                # 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 />";
Comment 1 Brion Vibber 2005-10-19 00:08:20 UTC

*** This bug has been marked as a duplicate of 3643 ***
Comment 2 Kalvinder Singh 2005-10-19 00:10:14 UTC
Created attachment 1010 [details]
Patch to fix the problem

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links