aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-10-16 22:53:04 +0200
committermarijus <mario@mariovavti.com>2014-10-16 22:53:04 +0200
commitf290c4b1e4c13389bacfd736772ce40fe1961f08 (patch)
tree7b19690db045808e304a63e90ee1fbdffc101dac /include/api.php
parent1ee2b631db1afdec9672c72f6a27f99cfc853fd6 (diff)
parente1f88fd15d75f81af5017860b9f197771326c9b7 (diff)
downloadvolse-hubzilla-f290c4b1e4c13389bacfd736772ce40fe1961f08.tar.gz
volse-hubzilla-f290c4b1e4c13389bacfd736772ce40fe1961f08.tar.bz2
volse-hubzilla-f290c4b1e4c13389bacfd736772ce40fe1961f08.zip
Merge branch 'master' of https://github.com/friendica/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");