Explorar o código

Merge pull request #385 from dzaikos/cache-image-size-2

Cache image size (take 2)
Andrew Dolgov %!s(int64=10) %!d(string=hai) anos
pai
achega
c7a0cb7cf4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      include/rssfuncs.php

+ 2 - 1
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);
 					}
 				}