From: Andrew Dolgov Date: Fri, 27 Feb 2015 11:51:26 +0000 (+0300) Subject: remove image.php; put cached image endpoint to public.php X-Git-Tag: 16.3~353 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0c6f7b314ae663f1f9fc8ade53b9914f46e02954;p=tt-rss.git remove image.php; put cached image endpoint to public.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) {