summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
-rw-r--r--modules/gallery/helpers/gallery.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index ca8c92c9..b016f436 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -18,13 +18,17 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class gallery_Core {
- const VERSION = "3.0 RC2 (Santa Fe)";
+ const VERSION = "3.0 (Santa Fe)";
/**
* If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is
* down for maintenance" page.
*/
static function maintenance_mode() {
+ // @todo: we need a mechanism here to identify controllers that are still legally accessible
+ // when the entire Gallery is in maintenance mode. Perhaps a controller class function or
+ // method?
+ // https://sourceforge.net/apps/trac/gallery/ticket/1411
if (Router::$controller != "login" &&
Router::$controller != "combined" &&
module::get_var("gallery", "maintenance_mode", 0) &&
@@ -41,8 +45,12 @@ class gallery_Core {
* the login page.
*/
static function private_gallery() {
+ // @todo: we need a mechanism here to identify controllers that are still legally accessible
+ // when the entire Gallery is private. Perhaps a controller class function or method?
+ // https://sourceforge.net/apps/trac/gallery/ticket/1411
if (Router::$controller != "login" &&
Router::$controller != "combined" &&
+ Router::$controller != "digibug" &&
identity::active_user()->guest &&
!access::user_can(identity::guest(), "view", item::root()) &&
php_sapi_name() != "cli") {
@@ -140,4 +148,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