summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/admin.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-13 09:59:27 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-13 09:59:27 -0700
commit938eea7fc45d5ad26529a14f349b7e4be2fecb15 (patch)
tree903f5fd467565b16e7e65d84101060920b1449b7 /modules/gallery/controllers/admin.php
parent0ebc36b4e5ef5578791c00b8a64021d3aad96068 (diff)
parent87f8b6ff0a76f51183f14515723a8345f7c14fa6 (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/controllers/admin.php')
-rw-r--r--modules/gallery/controllers/admin.php9
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");
}