diff options
author | Andrew Dolgov <[email protected]> | 2022-11-24 23:31:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-11-24 23:31:33 +0300 |
commit | a30b9bb649d6e10a5d7c2feb73376669cf23ef68 (patch) | |
tree | 33716caf2286a0c544a2f053ea07c677aebd5fd4 /classes/handler/public.php | |
parent | be6bc72a742c5fb7f87a4495009ed71ff0fbb8d8 (diff) |
rework favicon storage to use DiskCache
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-x | classes/handler/public.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index 08b73b87d..484f92507 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -769,6 +769,18 @@ class Handler_Public extends Handler { } } + function feed_icon() : void { + $id = (int)$_REQUEST['id']; + $cache = new DiskCache('feed-icons'); + + if ($cache->exists((string)$id)) { + $cache->send((string)$id); + } else { + header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); + echo "File not found."; + } + } + private function _make_article_tag_uri(int $id, string $timestamp): string { $timestamp = date("Y-m-d", strtotime($timestamp)); |