aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorpafcu <pafcu@iki.fi>2014-10-16 16:06:20 +0300
committerpafcu <pafcu@iki.fi>2014-10-16 16:06:20 +0300
commit865f804cfb86f12573ece550e1a7cf28172f6749 (patch)
tree5484d212498eea4ab0e98e531dc06d5623cb8364 /include/api.php
parentaa0aa22b8ad5db1589331e985e82781949985269 (diff)
parente1f88fd15d75f81af5017860b9f197771326c9b7 (diff)
downloadvolse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.tar.gz
volse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.tar.bz2
volse-hubzilla-865f804cfb86f12573ece550e1a7cf28172f6749.zip
Merge pull request #1 from friendica/master
Sync with upstream
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");