aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorMichal Klodner <michal.klodner@nfa.cz>2021-02-24 21:03:05 +0000
committerMichal Klodner <michal.klodner@nfa.cz>2021-02-24 21:03:05 +0000
commitf45ebfa2237536b0e5a0d23910d6ddfbb1040af0 (patch)
treef0366af1e1d1775942619a2f97a34895c6ca3abd /include/feedutils.php
parenta033c439f3486c6ce31fb5d680c363ce0582d451 (diff)
downloadvolse-hubzilla-f45ebfa2237536b0e5a0d23910d6ddfbb1040af0.tar.gz
volse-hubzilla-f45ebfa2237536b0e5a0d23910d6ddfbb1040af0.tar.bz2
volse-hubzilla-f45ebfa2237536b0e5a0d23910d6ddfbb1040af0.zip
- Enable enclosures in Atom/RSS (podcasts)
- Remove checking of audio/video URLs for pattern at the end
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 352b8f038..9cb645ff8 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -722,17 +722,17 @@ function get_atom_elements($feed, $item) {
if(! $type)
$type = 'application/octet-stream';
- if($ostatus_protocol) {
- if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
- }
- if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[video]' . $link . '[/video]';
- }
- if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]';
- }
+ // put media enclosures in bbcode markup
+ if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
+ }
+ if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[video]' . $link . '[/video]';
+ }
+ if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]';
}
+
$res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title );
}
}