mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
This commit is contained in:
committed by
Bharat Mediratta
parent
89d18c0714
commit
91a2c04a24
@@ -27,11 +27,10 @@ class Password_Controller extends Controller {
|
||||
if ($form->validate()) {
|
||||
$this->_send_reset($form);
|
||||
} else {
|
||||
print json_encode(array("result" => "error",
|
||||
"form" => (string) $form));
|
||||
json::reply(array("result" => "error", "form" => (string) $form));
|
||||
}
|
||||
} else {
|
||||
print $form;
|
||||
json::reply(array("form" => (string) $form));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +82,7 @@ class Password_Controller extends Controller {
|
||||
// Always pretend that an email has been sent to avoid leaking
|
||||
// information on what user names are actually real.
|
||||
message::success(t("Password reset email sent"));
|
||||
print json_encode(
|
||||
array("result" => "success"));
|
||||
json::reply(array("result" => "success"));
|
||||
}
|
||||
|
||||
private static function _reset_form() {
|
||||
|
||||
Reference in New Issue
Block a user