diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-08-01 08:31:09 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-08-01 08:31:09 -0700 |
| commit | a4531707274318496bb7a4477d940030d870f133 (patch) | |
| tree | 6715be3db83d7f834676a0b2c7a38c9bd58ce1a5 /modules/watermark/controllers | |
| parent | fc580037e797fad48b49fcffa7aa69dca8761972 (diff) | |
| parent | 7607e1f932dda53144792d0b7e8674a34fbc7f9a (diff) | |
Merge branch 'dialog' of github.com:gallery/gallery3 into dialog
Diffstat (limited to 'modules/watermark/controllers')
| -rw-r--r-- | modules/watermark/controllers/admin_watermarks.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php index 922b050b..0652b13c 100644 --- a/modules/watermark/controllers/admin_watermarks.php +++ b/modules/watermark/controllers/admin_watermarks.php @@ -35,7 +35,7 @@ class Admin_Watermarks_Controller extends Admin_Controller { } public function form_edit() { - json::reply(array("form" => (string) watermark::get_edit_form())); + print watermark::get_edit_form(); } public function edit() { @@ -53,12 +53,12 @@ class Admin_Watermarks_Controller extends Admin_Controller { array("result" => "success", "location" => url::site("admin/watermarks"))); } else { - json::reply(array("result" => "error", "form" => (string) $form)); + json::reply(array("result" => "error", "html" => (string)$form)); } } public function form_delete() { - json::reply(array("form" => (string) watermark::get_delete_form())); + print watermark::get_delete_form(); } public function delete() { @@ -81,12 +81,12 @@ class Admin_Watermarks_Controller extends Admin_Controller { } json::reply(array("result" => "success", "location" => url::site("admin/watermarks"))); } else { - json::reply(array("result" => "error", "form" => (string) $form)); + json::reply(array("result" => "error", "html" => (string)$form)); } } public function form_add() { - json::reply(array("form" => (string) watermark::get_add_form())); + print watermark::get_add_form(); } public function add() { @@ -120,7 +120,10 @@ class Admin_Watermarks_Controller extends Admin_Controller { log::success("watermark", t("Watermark saved")); json::reply(array("result" => "success", "location" => url::site("admin/watermarks"))); } else { - json::reply(array("result" => "error", "form" => rawurlencode((string) $form))); + // rawurlencode the results because the JS code that uploads the file buffers it in an + // iframe which entitizes the HTML and makes it difficult for the JS to process. If we url + // encode it now, it passes through cleanly. See ticket #797. + json::reply(array("result" => "error", "html" => rawurlencode((string)$form))); } } |
