Fix favicons update (#4358)

Better update the favicons when the URL changes
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2022-05-13 23:14:09 +02:00
1 parent 6e369e83bc
commit 7f0c378482
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -540,12 +540,15 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
}
if (trim($feed->website()) == '') {
$website = html_only_entity_decode($simplePie->get_link());
$feedProperties['website'] = $website == '' ? $feed->url() : $website;
$feed->_website($website == '' ? $feed->url() : $website);
$feedProperties['website'] = $feed->website();
$feed->faviconPrepare();
}
if (trim($feed->description()) == '') {
$description = html_only_entity_decode($simplePie->get_description());
if ($description != '') {
$feedProperties['description'] = $description;
$feed->_description($description);
$feedProperties['description'] = $feed->description();
}
}
}
+1 -1
View File
@@ -208,7 +208,7 @@ class FreshRSS_Feed extends Minz_Model {
$url = $this->url;
}
$txt = FAVICONS_DIR . $this->hash() . '.txt';
if (!file_exists($txt)) {
if (@file_get_contents($txt) !== $url) {
file_put_contents($txt, $url);
}
if (FreshRSS_Context::$isCli) {