summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-08-28 09:26:21 +0300
committerAndrew Dolgov <[email protected]>2023-08-28 09:26:21 +0300
commit1074b0a203f8192dd74b15f67e0a168cf9f3187a (patch)
treec209ad18b65bb7ba4514f14e73ca8e14f59a8cd3
parent93df71ae1f2bba49c85a1b06b792726ba67ae426 (diff)
only create flagfile if not exists
-rw-r--r--init.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.php b/init.php
index 2cafbd0..6a65cc5 100644
--- a/init.php
+++ b/init.php
@@ -147,10 +147,10 @@ class Api_Resize_Media extends Plugin {
if ($this->cache->exists($local_filename_flag)) {
Debug::log("[api_resize_media] $local_filename_flag exists, looks like we failed on this URL before; skipping.", Debug::LOG_VERBOSE);
return;
+ } else {
+ $this->cache->put($local_filename_flag, "");
}
- $this->cache->put($local_filename_flag, "");
-
if (!$this->cache->exists($local_filename)) {
$data = UrlHelper::fetch(["url" => $url, "max_size" => Config::get(Config::MAX_CACHE_FILE_SIZE)]);