diff options
author | Andrew Dolgov <[email protected]> | 2023-08-28 09:26:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-08-28 09:26:21 +0300 |
commit | 1074b0a203f8192dd74b15f67e0a168cf9f3187a (patch) | |
tree | c209ad18b65bb7ba4514f14e73ca8e14f59a8cd3 | |
parent | 93df71ae1f2bba49c85a1b06b792726ba67ae426 (diff) |
only create flagfile if not exists
-rw-r--r-- | init.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)]); |