summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/reauthenticate.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-29 09:22:32 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-31 15:44:56 -0700
commita6280641f53391dd57b3760ac882c3219e0cee6e (patch)
tree8f2bfa4ddf637b5e8523a2fa67b09e4b4bbf7d42 /modules/gallery/controllers/reauthenticate.php
parenta6ceb927e602dd693b011a17e625cc9c87d57d69 (diff)
Resend the entire dialog content (including the wrapping view) instead of just the form.
Diffstat (limited to 'modules/gallery/controllers/reauthenticate.php')
-rw-r--r--modules/gallery/controllers/reauthenticate.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/controllers/reauthenticate.php b/modules/gallery/controllers/reauthenticate.php
index 393f97cb..7f9e5edc 100644
--- a/modules/gallery/controllers/reauthenticate.php
+++ b/modules/gallery/controllers/reauthenticate.php
@@ -54,10 +54,13 @@ class Reauthenticate_Controller extends Controller {
$name = $user->name;
log::warning("user", t("Failed re-authentication for %name", array("name" => $name)));
module::event("user_auth_failed", $name);
- if (empty($reauthenticate["in_dialog"])) {
- self::_show_form($form);
+ if (request::is_ajax()) {
+ $v = new View("reauthenticate.html");
+ $v->form = $form;
+ $v->user_name = identity::active_user()->name;
+ json::reply(array("form" => (string) $v));
} else {
- json::reply(array("form" => (string) $form));
+ self::_show_form($form);
}
}
}