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
@@ -39,7 +39,7 @@ class Admin_Advanced_Settings_Controller extends Admin_Controller {
|
||||
$group->input("var_name")->label(t("Setting"))->value($var_name)->disabled(1);
|
||||
$group->textarea("value")->label(t("Value"))->value($value);
|
||||
$group->submit("")->value(t("Save"));
|
||||
print json_encode(array("form" => (string) $form));
|
||||
json::reply(array("form" => (string) $form));
|
||||
}
|
||||
|
||||
public function save($module_name, $var_name) {
|
||||
@@ -50,6 +50,6 @@ class Admin_Advanced_Settings_Controller extends Admin_Controller {
|
||||
t("Saved value for %var (%module_name)",
|
||||
array("var" => $var_name, "module_name" => $module_name)));
|
||||
|
||||
print json_encode(array("result" => "success"));
|
||||
json::reply(array("result" => "success"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user