]> git.wh0rd.org Git - tt-rss.git/commitdiff
Updated cache_images() to use _MIN_CACHE_IMAGE_SIZE constant when checking file size...
authorDave Zaikos <myself@zaikos.com>
Thu, 26 Jun 2014 21:22:59 +0000 (17:22 -0400)
committerDave Zaikos <myself@zaikos.com>
Thu, 26 Jun 2014 21:22:59 +0000 (17:22 -0400)
include/rssfuncs.php

index 010071e577dc1da4f8788679be1cf979715d6863..60cb3b2d24a007cbbee15612736f1f54a5dcdf82 100644 (file)
@@ -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('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() {
 
 
        function update_feedbrowser_cache() {
 
                                if (!file_exists($local_filename)) {
                                        $file_content = fetch_file_contents($src);
 
                                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);
                                        }
                                }
                                                file_put_contents($local_filename, $file_content);
                                        }
                                }