diff options
| author | 2021-03-27 22:16:44 +0100 | |
|---|---|---|
| committer | 2021-03-27 22:16:44 +0100 | |
| commit | 87d1036647519ecd6f17fd9c2675731cc4fa1dcd (patch) | |
| tree | 27fe95a57fff70837550850f74750f3f26f68769 /app/Models/Feed.php | |
| parent | cc6c529562ef5751133d97e3fec067c0072f215b (diff) | |
Fix regression media attachments (#3565)
#fix https://github.com/FreshRSS/FreshRSS/issues/3564
Bug introduced by https://github.com/FreshRSS/FreshRSS/pull/3361
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 51d63ef42..e3d8f253e 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -409,14 +409,14 @@ class FreshRSS_Feed extends Minz_Model { $height = $enclosure->get_height(); $width = $enclosure->get_width(); $length = $enclosure->get_length(); - if (strpos($mime, 'image') === 0 || ($mime == '' && $length == null && ($width != 0 || $height != 0))) { + if ($medium === 'image' || strpos($mime, 'image') === 0 || ($mime == '' && $length == null && ($width != 0 || $height != 0))) { $enclosureContent .= '<p class="enclosure-content"><img src="' . $elink . '" alt="" /></p>'; - } elseif (strpos($mime, 'audio') === 0) { + } elseif ($medium === 'audio' || strpos($mime, 'audio') === 0) { $enclosureContent .= '<p class="enclosure-content"><audio preload="none" src="' . $elink . ($length == null ? '' : '" data-length="' . intval($length)) . '" data-type="' . htmlspecialchars($mime, ENT_COMPAT, 'UTF-8') . '" controls="controls"></audio> <a download="" href="' . $elink . '">💾</a></p>'; - } elseif (strpos($mime, 'video') === 0) { + } elseif ($medium === 'video' || strpos($mime, 'video') === 0) { $enclosureContent .= '<p class="enclosure-content"><video preload="none" src="' . $elink . ($length == null ? '' : '" data-length="' . intval($length)) . '" data-type="' . htmlspecialchars($mime, ENT_COMPAT, 'UTF-8') |
