mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-05 15:06:28 -05:00
Fix favicons update (#4358)
Better update the favicons when the URL changes
This commit is contained in:
committed by
GitHub
parent
6e369e83bc
commit
7f0c378482
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user