Skip to content

Commit

Permalink
Include the graphics_toolkit_path from the advanced settings in the p…
Browse files Browse the repository at this point in the history
…ath when searching for the graphics toolkits directories. Fixes ticket #639
  • Loading branch information
Tim Almdal committed Oct 30, 2009
1 parent 59b5a05 commit 2942152
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/gallery/helpers/graphics.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ static function detect_toolkits() {
$toolkits->graphicsmagick->installed = false;
$toolkits->graphicsmagick->error = t("GraphicsMagick requires the <b>exec</b> function");
} else {
putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin:/opt/bin");
$graphics_path = module::get_var("gallery", "graphics_toolkit_path", null);

putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") .
":/usr/local/bin:/opt/local/bin:/opt/bin");

// @todo: consider refactoring the two segments below into a loop since they are so
// similar.
Expand Down

0 comments on commit 2942152

Please sign in to comment.