diff options
author | Chad Kieffer <ckieffer@227.1.241.10.in-addr.arpa> | 2010-06-14 14:43:14 -0400 |
---|---|---|
committer | Chad Kieffer <ckieffer@227.1.241.10.in-addr.arpa> | 2010-06-14 14:43:14 -0400 |
commit | 3c6e710aa75b309fd7ff50aa8f5c58721b17770f (patch) | |
tree | 062b516f3fad5921e4ace326fa6b2f7f868ca87e /modules/gallery/controllers/admin.php | |
parent | 782c1e0ae0bc597629abcd88f844d863da45901a (diff) | |
parent | 793780daa7665f7f86994235c4263fcb63554eb8 (diff) |
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/admin.php')
-rw-r--r-- | modules/gallery/controllers/admin.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gallery/controllers/admin.php b/modules/gallery/controllers/admin.php index 787a2138..c460f58c 100644 --- a/modules/gallery/controllers/admin.php +++ b/modules/gallery/controllers/admin.php @@ -22,7 +22,12 @@ class Admin_Controller extends Controller { public function __construct($theme=null) { if (!identity::active_user()->admin) { - access::forbidden(); + if (identity::active_user()->guest) { + Session::instance()->set("continue_url", url::abs_current(true)); + url::redirect("login"); + } else { + access::forbidden(); + } } parent::__construct(); @@ -78,7 +83,7 @@ class Admin_Controller extends Controller { private static function _prompt_for_reauth($controller_name, $args) { if (request::method() == "get" && !request::is_ajax()) { // Avoid anti-phishing protection by passing the url as session variable. - Session::instance()->set("continue_url", url::current(true)); + Session::instance()->set("continue_url", url::abs_current(true)); } url::redirect("reauthenticate"); } |