summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-11-24 23:31:33 +0300
committerAndrew Dolgov <[email protected]>2022-11-24 23:31:33 +0300
commita30b9bb649d6e10a5d7c2feb73376669cf23ef68 (patch)
tree33716caf2286a0c544a2f053ea07c677aebd5fd4 /classes/handler
parentbe6bc72a742c5fb7f87a4495009ed71ff0fbb8d8 (diff)
rework favicon storage to use DiskCache
Diffstat (limited to 'classes/handler')
-rwxr-xr-xclasses/handler/public.php12
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));