summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/admin.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-05 08:23:17 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-07-05 08:23:17 -0700
commit8493a3d36f597e183490ae880b35a3d98f50a045 (patch)
tree2012fdb411e164c65457d2df756cb2428acfd350 /modules/gallery/controllers/admin.php
parente4d397d30118a3d673b146c44ed329efa08bbefe (diff)
If the admin request originates as a dialog link, don't display the entire page when reauthenticating the administrator. Just put the form in the dialog.
Diffstat (limited to 'modules/gallery/controllers/admin.php')
-rw-r--r--modules/gallery/controllers/admin.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/gallery/controllers/admin.php b/modules/gallery/controllers/admin.php
index c460f58c..d9bee284 100644
--- a/modules/gallery/controllers/admin.php
+++ b/modules/gallery/controllers/admin.php
@@ -38,7 +38,8 @@ class Admin_Controller extends Controller {
return self::_reauth_check();
}
if (auth::must_reauth_for_admin_area()) {
- return self::_prompt_for_reauth($controller_name, $args);
+ print self::_prompt_for_reauth($controller_name, $args);
+ return;
}
if (request::method() == "post") {
@@ -85,7 +86,13 @@ class Admin_Controller extends Controller {
// Avoid anti-phishing protection by passing the url as session variable.
Session::instance()->set("continue_url", url::abs_current(true));
}
- url::redirect("reauthenticate");
+
+ // Check that we we not in a dialog. If we are, then use an ajax response.
+ if (strpos(Router::$query_string, "g-in-dialog") === false) {
+ url::redirect("reauthenticate");
+ } else {
+ return reauthenticate::get_authenticate_form();
+ }
}
}