From: Dave Zaikos Date: Thu, 26 Jun 2014 21:22:59 +0000 (-0400) Subject: Updated cache_images() to use _MIN_CACHE_IMAGE_SIZE constant when checking file size... X-Git-Tag: 1.13~9^2 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=a3d50184909491a64e4048ce75dae3590e462fb7 Updated cache_images() to use _MIN_CACHE_IMAGE_SIZE constant when checking file size. New constant is defined upon including rssfuncs.php if not already defined. --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 010071e5..60cb3b2d 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -2,6 +2,7 @@ define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30); define_default('DAEMON_FEED_LIMIT', 500); define_default('DAEMON_SLEEP_INTERVAL', 120); + define_default('_MIN_CACHE_IMAGE_SIZE', 1024); function update_feedbrowser_cache() { @@ -1173,7 +1174,7 @@ if (!file_exists($local_filename)) { $file_content = fetch_file_contents($src); - if ($file_content && strlen($file_content) > 1024) { + if ($file_content && strlen($file_content) > _MIN_CACHE_IMAGE_SIZE) { file_put_contents($local_filename, $file_content); } }