aboutsummaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/Feed.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php
index 02a4e6be7..19c3d8053 100644
--- a/app/models/Feed.php
+++ b/app/models/Feed.php
@@ -250,6 +250,16 @@ class Feed extends Model {
}
$content = $item->get_content ();
+ $links = array();
+ foreach ($item->get_enclosures() as $enclosure) {
+ $link = $enclosure->get_link();
+ if (array_key_exists($link, $links)) continue;
+ $links[$link] = '1';
+ $mime = strtolower($enclosure->get_type());
+ if (strpos($mime, 'image/') === 0) {
+ $content .= '<br /><img src="' . $link . '" />';
+ }
+ }
$entry = new Entry (
$this->id (),