From 87d1036647519ecd6f17fd9c2675731cc4fa1dcd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 27 Mar 2021 22:16:44 +0100 Subject: Fix regression media attachments (#3565) #fix https://github.com/FreshRSS/FreshRSS/issues/3564 Bug introduced by https://github.com/FreshRSS/FreshRSS/pull/3361 --- app/Models/Feed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Models/Feed.php') 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 .= '

'; - } elseif (strpos($mime, 'audio') === 0) { + } elseif ($medium === 'audio' || strpos($mime, 'audio') === 0) { $enclosureContent .= '

💾

'; - } elseif (strpos($mime, 'video') === 0) { + } elseif ($medium === 'video' || strpos($mime, 'video') === 0) { $enclosureContent .= '