aboutsummaryrefslogtreecommitdiff
path: root/views/json/page_shells/default.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-18 15:34:23 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-18 15:34:23 +0000
commit97d7421baea83266f611bcc3534840dd146cdec1 (patch)
tree6398b1d8fd336114f06d7a4c555903059499c3f7 /views/json/page_shells/default.php
parent930adeffe8d65c911f04fb37ca3cc65df3ed02e5 (diff)
downloadelgg-97d7421baea83266f611bcc3534840dd146cdec1.tar.gz
elgg-97d7421baea83266f611bcc3534840dd146cdec1.tar.bz2
Updating the core JSON views to allow for proper object export.
git-svn-id: http://code.elgg.org/elgg/trunk@6086 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/json/page_shells/default.php')
-rw-r--r--views/json/page_shells/default.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/views/json/page_shells/default.php b/views/json/page_shells/default.php
new file mode 100644
index 000000000..16cfa3cdd
--- /dev/null
+++ b/views/json/page_shells/default.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Elgg JSON output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+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