A free, self-hostable news aggregator…
Favicons : test pour améliorer le cache HTTP
Alexandre Alapetite2c57e7254d61
diff --git a/app/Models/Feed.php b/app/Models/Feed.phpindex f9a586122..4f90b9872 100644--- a/app/Models/Feed.php+++ b/app/Models/Feed.php@@ -116,7 +116,7 @@ class FreshRSS_Feed extends Minz_Model {@unlink($path . '.txt');}public function favicon () {- return Minz_Url::display ('/f.php?' . $this->hash());+ return Minz_Url::display ('/f.php/' . $this->hash());}public function _id ($value) {diff --git a/p/f.php b/p/f.phpindex 872b8cc2c..660128a59 100644--- a/p/f.php+++ b/p/f.php@@ -36,7 +36,14 @@ function download_favicon ($website, $dest) {return true;}-$id = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '0';+if (isset($_SERVER['PATH_INFO'])) {+ $id = substr($_SERVER['PATH_INFO'], 1);+} elseif (isset($_SERVER['QUERY_STRING'])) {+ $id = $_SERVER['QUERY_STRING'];+} else {+ $id = '0';+}+if (!ctype_xdigit($id)) {$id = '0';}