From 0c6f7b314ae663f1f9fc8ade53b9914f46e02954 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 27 Feb 2015 14:51:26 +0300 Subject: [PATCH] remove image.php; put cached image endpoint to public.php --- classes/handler/public.php | 31 +++++++++++++++++++++++ image.php | 52 -------------------------------------- include/functions2.php | 2 +- include/rssfuncs.php | 8 ------ 4 files changed, 32 insertions(+), 61 deletions(-) delete mode 100644 image.php diff --git a/classes/handler/public.php b/classes/handler/public.php index 34d57744..dafe2a8c 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -1002,5 +1002,36 @@ class Handler_Public extends Handler { diff --git a/image.php b/image.php deleted file mode 100644 index dcc7d806..00000000 --- a/image.php +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/include/functions2.php b/include/functions2.php index 17d8acb3..6d02d01e 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -900,7 +900,7 @@ $cached_filename = CACHE_DIR . '/images/' . sha1($src) . '.png'; if (file_exists($cached_filename)) { - $src = SELF_URL_PATH . '/image.php?hash=' . sha1($src); + $src = SELF_URL_PATH . '/public.php?op=cached_image&hash=' . sha1($src); } $entry->setAttribute('src', $src); diff --git a/include/rssfuncs.php b/include/rssfuncs.php index f80bcbb2..b285f74c 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1155,16 +1155,8 @@ file_put_contents($local_filename, $file_content); } } - - /* if (file_exists($local_filename)) { - $entry->setAttribute('src', SELF_URL_PATH . '/image.php?url=' . - base64_encode($src)); - } */ } } - - //$node = $doc->getElementsByTagName('body')->item(0); - //return $doc->saveXML($node); } function expire_error_log($debug) { -- 2.39.2