diff options
Diffstat (limited to 'lib/json.php')
-rw-r--r-- | lib/json.php | 6 |
1 files changed, 4 insertions, 2 deletions
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); } } |