From bcf92badd1dae888fec85c1b3615a924a2e6a859 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 26 Sep 2011 00:19:34 +0200 Subject: dont set content type to json for Apps --- lib/json.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/json.php') diff --git a/lib/json.php b/lib/json.php index 47d5e82fbb0..5ebd6c6b759 100644 --- a/lib/json.php +++ b/lib/json.php @@ -61,8 +61,10 @@ class OC_JSON{ /** * Encode and print $data in json format */ - public static function encodedPrint($data){ - self::setContentTypeHeader(); + public static function encodedPrint($data,$setContentType=true){ + if($setContentType){ + self::setContentTypeHeader(); + } echo json_encode($data); } } -- cgit v1.2.3