From 790bf4e871b1a1555dc32287ab222b6694d402a2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 22 Sep 2010 21:35:49 -0700 Subject: Prioritize using the value in graphics_toolkit_path over the standard path so that if you change that value in Admin > Settings > Advanced we prefer it over other paths (which may be restricted by open_basedir). Fixes #1395. --- modules/gallery/helpers/gallery.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index ca8c92c9..3cf0eacd 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -140,4 +140,17 @@ class gallery_Core { return $file_name; } + /** + * Set the PATH environment variable to the paths specified. + * @param array Array of paths. Each array entry can contain a colon separated list of paths. + */ + static function set_path_env($paths) { + $path_env = array(); + foreach ($paths as $path) { + if ($path) { + array_push($path_env, $path); + } + } + putenv("PATH=" . implode(":", $path_env)); + } } \ No newline at end of file -- cgit v1.2.3