mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-04 17:09:17 +00:00
properly remove and replace favicon color when favicon gets manually removed/uploaded
This commit is contained in:
@@ -336,6 +336,6 @@ function hsl2rgb($arr) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return '';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -412,17 +412,16 @@
|
||||
$favicon_file = ICONS_DIR . "/$feed.ico";
|
||||
|
||||
if (file_exists($favicon_file)) {
|
||||
require_once "colors.php";
|
||||
require_once "colors.php";
|
||||
|
||||
$favicon_color = db_escape_string($link,
|
||||
calculate_avg_color($favicon_file));
|
||||
$favicon_color = db_escape_string($link,
|
||||
calculate_avg_color($favicon_file));
|
||||
|
||||
if ($debug_enabled) _debug("color: $favicon_color");
|
||||
|
||||
$favicon_colorstring = ",favicon_avg_color = '".$favicon_color."'";
|
||||
$favicon_colorstring = ",favicon_avg_color = '".$favicon_color."'";
|
||||
}
|
||||
|
||||
db_query($link, "UPDATE ttrss_feeds SET favicon_last_checked = NOW() $favicon_colorstring
|
||||
db_query($link, "UPDATE ttrss_feeds SET favicon_last_checked = NOW()
|
||||
$favicon_colorstring
|
||||
WHERE id = '$feed'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user