]> git.wh0rd.org Git - tt-rss.git/commitdiff
do not needlessly mark icons as failed
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 24 Apr 2013 15:01:51 +0000 (19:01 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 24 Apr 2013 15:01:51 +0000 (19:01 +0400)
include/rssfuncs.php

index 6bb841c50fef04ad10be9054caf4a7734e0a22ab..f806d4807596abbc463e1a14079d4a4d63377ee4 100644 (file)
                                /* 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);
 
                                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));