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.

This commit is contained in:
Dave Zaikos 2014-06-26 17:22:59 -04:00
parent c6f9438a6e
commit a3d5018490
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30); define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30);
define_default('DAEMON_FEED_LIMIT', 500); define_default('DAEMON_FEED_LIMIT', 500);
define_default('DAEMON_SLEEP_INTERVAL', 120); define_default('DAEMON_SLEEP_INTERVAL', 120);
define_default('_MIN_CACHE_IMAGE_SIZE', 1024);
function update_feedbrowser_cache() { function update_feedbrowser_cache() {
@ -1173,7 +1174,7 @@
if (!file_exists($local_filename)) { if (!file_exists($local_filename)) {
$file_content = fetch_file_contents($src); $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); file_put_contents($local_filename, $file_content);
} }
} }