diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-04-23 19:59:54 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-04-23 19:59:54 -0700 |
commit | c3b0c96460da336bf720db0de2b396517004f514 (patch) | |
tree | e5f6e7ef60ac7ba74edeb0ee1193aeadb2184151 /modules/gallery/helpers | |
parent | 5d4d8a893bef935a47b04e72fffa113eba99dd71 (diff) |
Revert 0235c2062e9d980a4778c4b22678238c525e1cd7 and instead apply the fix from
iptox.net listed here: http://gallery.menalto.com/node/98768#comment-372398
Fixes for #1681, #1625
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/graphics.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 8d8853b0..acb11bfb 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -316,10 +316,10 @@ class graphics_Core { // ImageMagick & GraphicsMagick $magick_kits = array( "imagemagick" => array( - "name" => "ImageMagick", "binary" => "convert", "version" => "convert -version", + "name" => "ImageMagick", "binary" => "convert", "version_arg" => "-v", "version_regex" => "/Version: \S+ (\S+)/"), "graphicsmagick" => array( - "name" => "GraphicsMagick", "binary" => "gm", "version" => "gm version", + "name" => "GraphicsMagick", "binary" => "gm", "version_arg" => "version", "version_regex" => "/\S+ (\S+)/")); // Loop through the kits foreach ($magick_kits as $index => $settings) { @@ -328,7 +328,8 @@ class graphics_Core { $toolkits->$index->name = $settings["name"]; if ($path) { if (@is_file($path) && - preg_match($settings["version_regex"], shell_exec($settings["version"]), $matches)) { + preg_match( + $settings["version_regex"], shell_exec($path . " " . $settings["version_arg"]), $matches)) { $version = $matches[1]; $toolkits->$index->installed = true; |