summaryrefslogtreecommitdiff
path: root/plugins/cache_starred_images
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-14 12:44:50 +0300
committerAndrew Dolgov <[email protected]>2019-08-14 12:44:50 +0300
commit6914ad1f741570b66580d2933e8e2118adb177b5 (patch)
treef8a2c90dbf3b9aac401b17874936339fbe1d0861 /plugins/cache_starred_images
parent84974c60a7aeed1fc2f22ef170c53fec5099abd0 (diff)
retire MIN_CACHE_FILE_SIZE
Diffstat (limited to 'plugins/cache_starred_images')
-rwxr-xr-xplugins/cache_starred_images/init.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index 967569543..d13b0a443 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -141,13 +141,9 @@ class Cache_Starred_Images extends Plugin {
$data = fetch_file_contents(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]);
- if ($data) {
- if (strlen($data) > MIN_CACHE_FILE_SIZE) {
- $this->cache->put($local_filename, $data);
- }
+ if ($data)
+ return $this->cache->put($local_filename, $data);;
- return true;
- }
} else {
//Debug::log("cache_images: local file exists for $url", Debug::$LOG_VERBOSE);