diff options
author | Mario Vavti <mario@mariovavti.com> | 2023-04-16 17:13:00 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2023-04-16 17:13:00 +0200 |
commit | 235056190321ac29d35c5453c739eb1afa1e21dd (patch) | |
tree | 7dae05bf60df7776527eb10eda4ca5edd734250e | |
parent | 5674badccd29f7a7069892cf0c0088e7f50f5f27 (diff) | |
parent | a793f4414dcb2ea5258a2c33a85a9996f54d6119 (diff) | |
download | volse-hubzilla-235056190321ac29d35c5453c739eb1afa1e21dd.tar.gz volse-hubzilla-235056190321ac29d35c5453c739eb1afa1e21dd.tar.bz2 volse-hubzilla-235056190321ac29d35c5453c739eb1afa1e21dd.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r-- | include/feedutils.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/feedutils.php b/include/feedutils.php index 43b95b966..b657c28d0 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -598,12 +598,13 @@ function get_atom_elements($feed, $item) { // uses the OStatus stack. We need a more generalised way for the calling // function to specify this behaviour or for plugins to alter it. + $terms = []; + if($ostatus_protocol) { $res['title'] = ''; } elseif($res['plink'] && $res['title']) { $res['body'] = '#^[url=' . $res['plink'] . ']' . $res['title'] . '[/url]' . "\n\n" . $res['body']; - $terms = array(); $terms[] = array( 'otype' => TERM_OBJ_POST, 'ttype' => TERM_BOOKMARK, @@ -613,7 +614,6 @@ function get_atom_elements($feed, $item) { } elseif($res['plink']) { $res['body'] = '#^[url]' . $res['plink'] . '[/url]' . "\n\n" . $res['body']; - $terms = array(); $terms[] = array( 'otype' => TERM_OBJ_POST, 'ttype' => TERM_BOOKMARK, @@ -698,7 +698,7 @@ function get_atom_elements($feed, $item) { } } - if(! is_null($terms)) + if($terms) $res['term'] = $terms; $attach = $item->get_enclosures(); |