From: Andrew Dolgov Date: Thu, 16 Aug 2018 08:56:51 +0000 (+0300) Subject: cache_media: only show downloading debug message when actually downloading X-Git-Tag: 18.12~95^2~2 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=163b50b15f3b163a392327692aede68e31a6204e cache_media: only show downloading debug message when actually downloading --- diff --git a/classes/rssutils.php b/classes/rssutils.php index bd20a6b4..554d89f5 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -1239,9 +1239,11 @@ class RSSUtils { $local_filename = CACHE_DIR . "/images/" . sha1($src); - if ($debug) _debug("cache_media: downloading: $src to $local_filename"); + if ($debug) _debug("cache_media: checking $src"); if (!file_exists($local_filename)) { + if ($debug) _debug("cache_media: downloading: $src to $local_filename"); + $file_content = fetch_file_contents($src); if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {