summaryrefslogtreecommitdiff
path: root/include/functions2.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-03-23 15:19:25 +0300
committerAndrew Dolgov <[email protected]>2017-03-23 15:19:25 +0300
commit388d4dfa88e843237ebe57e9a0376d0cd58c0f51 (patch)
tree1a2be54903bb2e40431a9e4972b1dcf0957d5891 /include/functions2.php
parent9c3c0ace6b149b0e1ed248d6f5b89a469a2971ee (diff)
enable caching of media in article enclosures
Diffstat (limited to 'include/functions2.php')
-rw-r--r--include/functions2.php5
1 files changed, 5 insertions, 0 deletions
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);
}
}