diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-05 06:28:52 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-05 06:28:52 +0100 |
commit | 2afdba48f06bb99922c19bf964d8f601c1545166 (patch) | |
tree | bbd1418a44cee6306a568bb64f4caa2d93eeb289 /mod/oep.php | |
parent | 8f810a3dcfd60c00b14d3da811e1c0cf005e8ced (diff) | |
parent | 425089524373137e11d3691e7efdce0fb89281c8 (diff) | |
download | volse-hubzilla-2afdba48f06bb99922c19bf964d8f601c1545166.tar.gz volse-hubzilla-2afdba48f06bb99922c19bf964d8f601c1545166.tar.bz2 volse-hubzilla-2afdba48f06bb99922c19bf964d8f601c1545166.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/oep.php')
-rw-r--r-- | mod/oep.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mod/oep.php b/mod/oep.php index 3855a1b4a..42535c069 100644 --- a/mod/oep.php +++ b/mod/oep.php @@ -8,6 +8,7 @@ function oep_init(&$a) { logger('oep: ' . print_r($_REQUEST,true), LOGGER_DEBUG, LOG_INFO); + $html = ((argc() > 1 && argv(1) === 'html') ? true : false); if($_REQUEST['url']) { $_REQUEST['url'] = strip_zids($_REQUEST['url']); $url = $_REQUEST['url']; @@ -38,8 +39,16 @@ function oep_init(&$a) { $arr = oep_profile_reply($_REQUEST); if($arr) { - header('Content-Type: application/json+oembed'); - echo json_encode($arr); + if($html) { + if($arr['type'] === 'rich') { + header('Content-Type: text/html'); + echo $arr['html']; + } + } + else { + header('Content-Type: application/json+oembed'); + echo json_encode($arr); + } killme(); } |