aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-01 22:58:15 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-01 22:58:15 +0100
commitb0cbc6fe5da527aa2a4fedf4b138264ff983d159 (patch)
treed3eff0f73423f7bc4e598a22d559a213dcf080ef /lib/lib_rss.php
parentbaa8d21341d3f35a06815fd3f4ec536ef6ac2f3e (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 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 46bf76d2c..c4ca03165 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -198,41 +198,6 @@ function get_content_by_parsing ($url, $path) {
}
}
-/* Télécharge le favicon d'un site, le place sur le serveur et retourne l'URL */
-function download_favicon ($website, $id) {
- $url = 'http://g.etfv.co/' . $website;
- $favicons_dir = PUBLIC_PATH . '/favicons';
- $dest = $favicons_dir . '/' . $id . '.ico';
-
- if (!is_dir ($favicons_dir)) {
- if (!mkdir ($favicons_dir, 0755, true)) {
- return $url;
- }
- }
-
- if (!file_exists ($dest)) {
- $c = curl_init ($url);
- curl_setopt ($c, CURLOPT_HEADER, false);
- curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);
- curl_setopt ($c, CURLOPT_BINARYTRANSFER, true);
- $imgRaw = curl_exec ($c);
-
- if (curl_getinfo ($c, CURLINFO_HTTP_CODE) == 200) {
- $file = fopen ($dest, 'w');
- if ($file === false) {
- return $url;
- }
-
- fwrite ($file, $imgRaw);
- fclose ($file);
- } else {
- return $url;
- }
-
- curl_close ($c);
- }
-}
-
/**
* Add support of image lazy loading
* Move content from src attribute to data-original