diff options
author | Andrew Dolgov <[email protected]> | 2008-10-26 17:53:46 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-10-26 17:53:46 +0100 |
commit | 7defa0891a8c458e32c68ec8519ee46c569c65e8 (patch) | |
tree | 550f40b1c7c271ad70dfa8bf5863a1688ac7ae52 /functions.php | |
parent | b652fdae2926e6e267bfb8744470a03558d38a4a (diff) |
check file size when considering whether feed icon is valid (closes #223)
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/functions.php b/functions.php index f32d85af9..89ec87a06 100644 --- a/functions.php +++ b/functions.php @@ -2738,7 +2738,7 @@ $last_updated = htmlspecialchars($last_updated); - $has_img = is_file(ICONS_DIR . "/$id.ico"); + $has_img = feed_has_icon($id); $tmp_result = db_query($link, "SELECT ttrss_feeds.id,COUNT(unread) AS unread @@ -5096,7 +5096,7 @@ $entry_author = " - $entry_author"; } - $has_feed_icon = is_file(ICONS_DIR . "/$feed_id.ico"); + $has_feed_icon = feed_has_icon($feed_id); if ($has_feed_icon) { $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">"; @@ -5198,7 +5198,7 @@ $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup($feed_id);' href='#'>mark as read</a>)"; - $has_feed_icon = is_file(ICONS_DIR . "/$feed_id.ico"); + $has_feed_icon = feed_has_icon($feed_id); if ($has_feed_icon) { $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">"; @@ -5838,4 +5838,8 @@ onclick=\"return addLabelExample()\" value=\"".__("Add")."\">"; } + + function feed_has_icon($id) { + return is_file(ICONS_DIR . "/$id.ico") && filesize(ICONS_DIR . "/$id.ico") > 0; + } ?> |