Page MenuHomePhabricator

[Patch] Fix Windows ImageMagick Thumbnails
Closed, DeclinedPublic

Description

Author: chris

Description:
If the thumbnail or source image lives in a path containing a space (IE:
C:\Program Files), then when $wgUseImageMagick is set, the thumbnail will fail
to be created, under windows.

To get around this, you merely need to insert quotation marks around the
filenames. These lines are intended to replace lines 462-465 of includes/Image.php:

$cmd = $wgImageMagickConvertCommand .

					" -quality 85 -background white -geometry {$width} \"".
					($this->imagePath) . "\" \"" .
					($thumbPath) . "\"";

Version: 1.4.x
Severity: normal
OS: Windows 2000
Platform: PC

Details

Reference
bz1684

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:16 PM
bzimport set Reference to bz1684.
bzimport added a subscriber: Unknown Object (MLST).

This is incorrect and potentially dangerous. Use wfEscapeShellArg().

robchur wrote:

Unable to reproduce the originally reported behaviour under SVN trunk; suspect
this was fixed since 1.6 and poss. 1.5 branches.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:22 AM
epriestley added a commit: Unknown Object (Diffusion Commit).