aboutsummaryrefslogtreecommitdiff
path: root/views/json/pageshells
diff options
context:
space:
mode:
Diffstat (limited to 'views/json/pageshells')
-rw-r--r--views/json/pageshells/pageshell.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/views/json/pageshells/pageshell.php b/views/json/pageshells/pageshell.php
index d9cb52b9b..ae51b49e5 100644
--- a/views/json/pageshells/pageshell.php
+++ b/views/json/pageshells/pageshell.php
@@ -10,7 +10,14 @@
* @link http://elgg.org/
*
*/
-
- header("Content-Type: application/json");
- echo $vars['body'];
+
+ if(stristr($_SERVER["HTTP_ACCEPT"],"application/json")) {
+ header("Content-Type: application/json");
+ } else {
+ header("Content-Type: application/javascript");
+ }
+ // echo $vars['body'];
+
+ global $jsonexport;
+ echo json_encode($jsonexport);
?> \ No newline at end of file