From 388d4dfa88e843237ebe57e9a0376d0cd58c0f51 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 23 Mar 2017 15:19:25 +0300 Subject: enable caching of media in article enclosures --- include/functions2.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/functions2.php') diff --git a/include/functions2.php b/include/functions2.php index 9d6eb9330..e00a0ba13 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -1816,6 +1816,11 @@ if (db_num_rows($result) > 0) { while ($line = db_fetch_assoc($result)) { + + if (file_exists(CACHE_DIR . '/images/' . sha1($line["content_url"]))) { + $line["content_url"] = get_self_url_prefix() . '/public.php?op=cached_url&hash=' . sha1($line["content_url"]); + } + array_push($rv, $line); } } -- cgit v1.2.3