Page MenuHomePhabricator

limiting image size in user preference don't work as expected
Closed, ResolvedPublic

Description

if you limit in your preference image size viewed in [[Image:]] page the full
size url doesn't work as expected (see code ImagePage.php line 45 $url is
overwritten later when calling createThumb(). Patch joined. A side effect of
this patch is to not call createThumb() twice when image size is constrained by
both with and height. (Note this bug is unrelated to Brion recent fix about $max
et $height uninitialized when user preference about max image size is not set)

Bug easy to reproduce, set your user pref to 320*200, go to the above url click
on the link view full image size.


Version: 1.4.x
Severity: normal
OS: Linux
Platform: PC
URL: http://commons.wikimedia.org/wiki/Image:Luigi_galvani.jpg

Details

Reference
bz1024

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:02 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz1024.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 158
bug fix, side effect is to call createThumb() only one time.

attachment ImagePage.php.diff ignored as obsolete

Created attachment 161
158: bug fix, side effect is to call createThumb() at most one time

ignore the previous patch, I sent the wrong one...

Attached:

jeluf wrote:

Thanks for the fix!

Applied to HEAD and REL1_4. Deployed to commons.wikipedia.org. Verified.