summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-24 19:01:51 +0400
committerAndrew Dolgov <[email protected]>2013-04-24 19:01:51 +0400
commitaafd55bab612a78816f0e91b7c8bfec1d3746f32 (patch)
treec6bc096660058fcd620cd6b1fcb6923c09920d8d /include
parent3472c4c5696cfa868b16d81c937605258acd2125 (diff)
do not needlessly mark icons as failed
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 6bb841c50..f806d4807 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -418,9 +418,6 @@
/* terrible hack: if we crash on floicon shit here, we won't check
* the icon avgcolor again (unless the icon got updated) */
- db_query("UPDATE ttrss_feeds SET favicon_avg_color = 'fail' WHERE
- id = '$feed'");
-
$favicon_file = ICONS_DIR . "/$feed.ico";
$favicon_modified = @filemtime($favicon_file);
@@ -435,6 +432,9 @@
if (file_exists($favicon_file) && function_exists("imagecreatefromstring") && $favicon_avg_color == '') {
require_once "colors.php";
+ db_query("UPDATE ttrss_feeds SET favicon_avg_color = 'fail' WHERE
+ id = '$feed'");
+
$favicon_color = db_escape_string(
calculate_avg_color($favicon_file));