dont set content type to json for Apps

This commit is contained in:
Robin Appelman 2011-09-26 00:19:34 +02:00
parent 63e6863222
commit bcf92badd1
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -12,7 +12,7 @@
<li <?php if($app['active']) echo 'class="active"'?> data-id="<?php echo $app['id'] ?>">
<?php echo $app['name'] ?>
<span class="hidden">
<?php OC_JSON::encodedPrint($app) ?>
<?php OC_JSON::encodedPrint($app,false) ?>
</span>
</li>
<?php endforeach;?>