summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-30 10:31:47 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-30 10:31:47 -0700
commit294215258a30bb0e99701655ce2b69271446a867 (patch)
tree130307edfc7a43d312d098c2cbbc98c80e976f8f /modules/gallery
parent59b5a0549635aa5c8320707cec75612746debdd0 (diff)
Include the graphics_toolkit_path from the advanced settings in the path when searching for the graphics toolkits directories. Fixes ticket #639
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/graphics.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 1063c073..d6a2f00c 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -278,7 +278,10 @@ class graphics_Core {
$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.