do not calculate favicon color on manual icon replace

This commit is contained in:
Andrew Dolgov 2013-04-29 16:08:40 +04:00
parent e50920bbc0
commit 258068b379
1 changed files with 1 additions and 7 deletions

View File

@ -500,14 +500,8 @@ class Pref_Feeds extends Handler_Protected {
if ($this->dbh->num_rows($result) != 0) { if ($this->dbh->num_rows($result) != 0) {
@unlink(ICONS_DIR . "/$feed_id.ico"); @unlink(ICONS_DIR . "/$feed_id.ico");
if (rename($icon_file, ICONS_DIR . "/$feed_id.ico")) { if (rename($icon_file, ICONS_DIR . "/$feed_id.ico")) {
require_once "colors.php";
$favicon_color = $this->dbh->escape_string(
calculate_avg_color(ICONS_DIR . "/$feed_id.ico"));
$this->dbh->query("UPDATE ttrss_feeds SET $this->dbh->query("UPDATE ttrss_feeds SET
favicon_avg_color = '$favicon_color' favicon_avg_color = ''
WHERE id = '$feed_id'"); WHERE id = '$feed_id'");
$rc = 0; $rc = 0;