diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-09-12 14:34:49 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-09-12 14:34:49 -0700 |
commit | b08bf26d2db6c78315ef3ddfc2e0191923ecfa42 (patch) | |
tree | 30dba19ae7a5262d14e7efc061b9929d4038c32a /modules/gallery/helpers/gallery.php | |
parent | a98841613a62a27d0a6c157d6f62546e319a08b9 (diff) |
Ignore the private gallery settings if we're in the cli SAPI. It
breaks the upgrader. Fixes #1361, thanks to Romain LE DISEZ.
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
-rw-r--r-- | modules/gallery/helpers/gallery.php | 3 |
1 files changed, 2 insertions, 1 deletions
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 |