From b08bf26d2db6c78315ef3ddfc2e0191923ecfa42 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 12 Sep 2010 14:34:49 -0700 Subject: Ignore the private gallery settings if we're in the cli SAPI. It breaks the upgrader. Fixes #1361, thanks to Romain LE DISEZ. --- modules/gallery/helpers/gallery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 9430231c..ca8c92c9 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -44,7 +44,8 @@ class gallery_Core { if (Router::$controller != "login" && Router::$controller != "combined" && identity::active_user()->guest && - !access::user_can(identity::guest(), "view", item::root())) { + !access::user_can(identity::guest(), "view", item::root()) && + php_sapi_name() != "cli") { if (Router::$controller == "admin") { // At this point we're in the admin theme and it doesn't have a themed login page, so // we can't just swap in the login controller and have it work. So redirect back to the -- cgit v1.2.3