diff options
| author | 2013-12-01 22:58:15 +0100 | |
|---|---|---|
| committer | 2013-12-01 22:58:15 +0100 | |
| commit | b0cbc6fe5da527aa2a4fedf4b138264ff983d159 (patch) | |
| tree | d3eff0f73423f7bc4e598a22d559a213dcf080ef /app/models | |
| parent | baa8d21341d3f35a06815fd3f4ec536ef6ac2f3e (diff) | |
Favicons en parallèle
Nouvelle méthode pour afficher les favicons à la demande et en
parallèle.
Déplacement du dossier des favicons sous /data/favicons/
Devrait permettre de fermer le problème d'import OPML
https://github.com/marienfressinaud/FreshRSS/issues/228
Voir aussi https://github.com/marienfressinaud/FreshRSS/issues/290
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/Feed.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php index f183b2aa7..41eb3df23 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -96,14 +96,11 @@ class Feed extends Model { return $this->nbNotRead; } public function favicon () { - $file = '/favicons/' . $this->id () . '.ico'; - - $favicon_url = Url::display ($file); - if (!file_exists (PUBLIC_PATH . $file)) { - download_favicon ($this->website (), $this->id ()); + $file = DATA_PATH . '/favicons/' . $this->id () . '.txt'; + if (!file_exists ($file)) { + file_put_contents($file, $this->website ()); } - - return $favicon_url; + return Url::display ('/f.php?' . $this->id ()); } public function _id ($value) { |
