diff options
author | Andrew Dolgov <[email protected]> | 2013-04-15 18:22:48 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-15 18:22:48 +0400 |
commit | bc7a144dd589302025c3b024d6da71f2e53d6496 (patch) | |
tree | 94b16695972e4476b4582b55a7a36936b1fd9d28 /include | |
parent | 86f7d2a9f2b6468a34b20d7a26c7cfc3afbe00ee (diff) |
properly remove and replace favicon color when favicon gets manually removed/uploaded
Diffstat (limited to 'include')
-rw-r--r-- | include/colors.php | 2 | ||||
-rw-r--r-- | include/rssfuncs.php | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/include/colors.php b/include/colors.php index 19c891517..1359b9e2d 100644 --- a/include/colors.php +++ b/include/colors.php @@ -336,6 +336,6 @@ function hsl2rgb($arr) { } } } - return false; + return ''; } ?> diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 250534bd7..283e48532 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -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'"); } |