diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
commit | 691ce806dc9aefac596a692ff2ba927a81a65440 (patch) | |
tree | 410f64288ef1d8bbc8455509af74d0e7582dc48e /modules/gallery/controllers/admin.php | |
parent | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (diff) | |
parent | 8559cdb5b6bfa87864941f726521660023779fa7 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/admin.php')
-rw-r--r-- | modules/gallery/controllers/admin.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/controllers/admin.php b/modules/gallery/controllers/admin.php index 40dd260b..8fc5432d 100644 --- a/modules/gallery/controllers/admin.php +++ b/modules/gallery/controllers/admin.php @@ -78,14 +78,16 @@ class Admin_Controller extends Controller { $result->location = url::abs_site(""); } - print json_encode($result); + json::reply($result); } private static function _prompt_for_reauth($controller_name, $args) { - if (request::method() == "get" && !request::is_ajax()) { + if (request::method() == "get") { // Avoid anti-phishing protection by passing the url as session variable. Session::instance()->set("continue_url", url::abs_current(true)); } + // Save the is_ajax value as we lose it, if set, when we redirect + Session::instance()->set("is_ajax_request", request::is_ajax()); url::redirect("reauthenticate"); } } |