summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-15 08:00:18 +0300
committerAndrew Dolgov <[email protected]>2020-09-15 08:00:18 +0300
commit478850ae6f56edaf1cd8bbc172b16e1cc2a59e7d (patch)
tree55a5b948b00ca72955814ac6d618ea0ee52739e9
parent027b9cd6b23cb35a39491a6df35fc8e7046bad4e (diff)
never print received data directly, always redirect to cached_url
-rw-r--r--init.php6
1 files changed, 0 insertions, 6 deletions
diff --git a/init.php b/init.php
index 8171189..457843c 100644
--- a/init.php
+++ b/init.php
@@ -151,10 +151,7 @@ class Api_Resize_Media extends Plugin {
$data = fetch_file_contents(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]);
if ($data) {
-
if ($this->cache->put($local_filename, $data)) {
-
-
if ($this->cache->exists($resized_filename)) {
header("Location: " . $this->cache->getUrl($resized_filename));
return;
@@ -176,9 +173,6 @@ class Api_Resize_Media extends Plugin {
return;
}
}
-
- } else {
- print $data;
}
} else {
global $fetch_last_error;