diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-22 22:09:56 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-22 22:09:56 -0700 |
| commit | d2bf5c9d1f28e90223b484addd6969c46f3160b5 (patch) | |
| tree | e30605417acaabd64f1c23c9fb53fd85aaeedb08 /modules/gallery/helpers/gallery.php | |
| parent | 3a9bdebafda1807bb2294c041e655f6464841bf0 (diff) | |
| parent | 7116f820ca2b6338abdca233a4b1d42d29a41150 (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
| -rw-r--r-- | modules/gallery/helpers/gallery.php | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
