Skip to content

Commit

Permalink
Revert 0235c20 and instead apply the fix from
Browse files Browse the repository at this point in the history
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 c3b0c96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/gallery/helpers/graphics.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ static function detect_toolkits() {
// ImageMagick & GraphicsMagick // ImageMagick & GraphicsMagick
$magick_kits = array( $magick_kits = array(
"imagemagick" => array( "imagemagick" => array(
"name" => "ImageMagick", "binary" => "convert", "version" => "convert -version", "name" => "ImageMagick", "binary" => "convert", "version_arg" => "-v",
"version_regex" => "/Version: \S+ (\S+)/"), "version_regex" => "/Version: \S+ (\S+)/"),
"graphicsmagick" => array( "graphicsmagick" => array(
"name" => "GraphicsMagick", "binary" => "gm", "version" => "gm version", "name" => "GraphicsMagick", "binary" => "gm", "version_arg" => "version",
"version_regex" => "/\S+ (\S+)/")); "version_regex" => "/\S+ (\S+)/"));
// Loop through the kits // Loop through the kits
foreach ($magick_kits as $index => $settings) { foreach ($magick_kits as $index => $settings) {
Expand All @@ -328,7 +328,8 @@ static function detect_toolkits() {
$toolkits->$index->name = $settings["name"]; $toolkits->$index->name = $settings["name"];
if ($path) { if ($path) {
if (@is_file($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]; $version = $matches[1];


$toolkits->$index->installed = true; $toolkits->$index->installed = true;
Expand Down

0 comments on commit c3b0c96

Please sign in to comment.