diff options
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r-- | lib/exe/fetch.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index f1cf9c7b4..e45c27e67 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -224,8 +224,9 @@ function calc_cache($cache){ function get_from_URL($url,$ext,$cache){ global $conf; - // if 'nocache' just redirect - if ($cache==0) { return false; } + // if no cache or fetchsize just redirect + if ($cache==0) return false; + if (!$conf['fetchsize']) return false; $local = getCacheName(strtolower($url),".media.$ext"); $mtime = @filemtime($local); // 0 if not exists @@ -234,7 +235,7 @@ function get_from_URL($url,$ext,$cache){ if( ($mtime == 0) || // cache does not exist ($cache != -1 && $mtime < time()-$cache) // 'recache' and cache has expired ){ - if(io_download($url,$local)){ + if(io_download($url,$local,false,'',$conf['fetchsize'])){ return $local; }else{ return false; |