summaryrefslogtreecommitdiff
path: root/modules/watermark
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-01 10:39:32 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-01 10:39:32 -0700
commit9369fd55a36183b7dc1e4b42af46a8f649a66578 (patch)
treee9199508afae73702d6edab5450d96514abfdb1c /modules/watermark
parent3b187d7fe9acbe46e38ae824b6374dd3bfd0cfb0 (diff)
Force the response type for uploaded watermarks to text/html.
// Override the application/json mime type. The dialog based HTML uploader uses an iframe to // buffer the reply, and on some browsers (Firefox 3.6) it does not know what to do with the // JSON that it gets back so it puts up a dialog asking the user what to do with it. So force // the encoding type back to HTML for the iframe. // See: http://jquery.malsup.com/form/#file-upload
Diffstat (limited to 'modules/watermark')
-rw-r--r--modules/watermark/controllers/admin_watermarks.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php
index 0652b13c..a2cafee0 100644
--- a/modules/watermark/controllers/admin_watermarks.php
+++ b/modules/watermark/controllers/admin_watermarks.php
@@ -125,6 +125,13 @@ class Admin_Watermarks_Controller extends Admin_Controller {
// encode it now, it passes through cleanly. See ticket #797.
json::reply(array("result" => "error", "html" => rawurlencode((string)$form)));
}
+
+ // Override the application/json mime type. The dialog based HTML uploader uses an iframe to
+ // buffer the reply, and on some browsers (Firefox 3.6) it does not know what to do with the
+ // JSON that it gets back so it puts up a dialog asking the user what to do with it. So force
+ // the encoding type back to HTML for the iframe.
+ // See: http://jquery.malsup.com/form/#file-upload
+ header("Content-Type: text/html; charset=" . Kohana::CHARSET);
}
private function _update_graphics_rules() {