Permalink
Browse files

Revert 0235c20 and instead apply the fix from

iptox.net listed here: http://gallery.menalto.com/node/98768#comment-372398

Fixes for #1681, #1625
  • Loading branch information...
bharat committed Apr 24, 2011
1 parent 5d4d8a8 commit c3b0c96460da336bf720db0de2b396517004f514
Showing with 4 additions and 3 deletions.
  1. +4 −3 modules/gallery/helpers/graphics.php
@@ -316,10 +316,10 @@ static function detect_toolkits() {
// 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 @@ static function detect_toolkits() {
$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;

0 comments on commit c3b0c96

Please sign in to comment.