From b0cbc6fe5da527aa2a4fedf4b138264ff983d159 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 1 Dec 2013 22:58:15 +0100 Subject: Favicons en parallèle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/models/Feed.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'app/models') 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) { -- cgit v1.2.3