aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-08 20:16:10 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-08 20:16:10 +0100
commit670ee57b6288549ac611d53d86d8f5ffee641b0e (patch)
tree040598a6797d0d44a1f2533b536f5a7fb3cf8856 /app/Models/Feed.php
parentfaa9a74324942e9be4682067208e1ef3a8f332a7 (diff)
Interface to enable/disable API and unsafe automatic login
https://github.com/marienfressinaud/FreshRSS/issues/13 https://github.com/marienfressinaud/FreshRSS/issues/440
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 73f9c32fb..bce3bd24f 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -254,11 +254,12 @@ class FreshRSS_Feed extends Minz_Model {
$elinks = array();
foreach ($item->get_enclosures() as $enclosure) {
$elink = $enclosure->get_link();
- if (array_key_exists($elink, $elinks)) continue;
- $elinks[$elink] = '1';
- $mime = strtolower($enclosure->get_type());
- if (strpos($mime, 'image/') === 0) {
- $content .= '<br /><img src="' . $elink . '" alt="" />';
+ if (empty($elinks[$elink])) {
+ $elinks[$elink] = '1';
+ $mime = strtolower($enclosure->get_type());
+ if (strpos($mime, 'image/') === 0) {
+ $content .= '<br /><img src="' . $elink . '" alt="" />';
+ }
}
}