Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-09-26 02:19:34 +0400
committerRobin Appelman <icewind1991@gmail.com>2011-09-26 02:19:34 +0400
commitbcf92badd1dae888fec85c1b3615a924a2e6a859 (patch)
tree1063ac8bd982f4ec974f727511f5c5a2f5e3bee3
parent63e6863222b92d7fc2e6ca5ccb3ab79688594348 (diff)
dont set content type to json for Apps
-rw-r--r--lib/json.php6
-rw-r--r--settings/templates/apps.php2
2 files changed, 5 insertions, 3 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);
}
}
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index ba2385d794f..6f16152bc5b 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -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;?>