aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2014-10-16 21:37:14 +0200
committerStefan Parviainen <saparvia@caterva.eu>2014-10-16 21:37:14 +0200
commite425def2a2d81dc39e113a343eeab51764ce1163 (patch)
tree6535fba49d62e8ba504d73d4623616118ee3ec73 /include/api.php
parent6867a8a7f6060c82cba3a34cd944a3737e8e263e (diff)
parent865f804cfb86f12573ece550e1a7cf28172f6749 (diff)
downloadvolse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.tar.gz
volse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.tar.bz2
volse-hubzilla-e425def2a2d81dc39e113a343eeab51764ce1163.zip
Merge branch 'master' of https://github.com/pafcu/red
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/api.php b/include/api.php
index 2505def4c..8b52253dd 100644
--- a/include/api.php
+++ b/include/api.php
@@ -197,7 +197,10 @@ require_once('include/items.php');
case "json":
header ("Content-Type: application/json");
foreach($r as $rr)
- return json_encode($rr);
+ $json = json_encode($rr);
+ if ($_GET['callback'])
+ $json = $_GET['callback']."(".$json.")";
+ return $json;
break;
case "rss":
header ("Content-Type: application/rss+xml");