#505904 by kscheirer: Private files not protected hook_file_download() check.
authorandrew morton
Wed, 19 Aug 2009 20:59:15 +0000 (20:59 +0000)
committerandrew morton
Wed, 19 Aug 2009 20:59:15 +0000 (20:59 +0000)
imagecache.module

index 116faa5..76419ab 100644 (file)
@@ -267,7 +267,7 @@ function imagecache_cache_private() {
   $preset = check_plain(array_shift($args));
   $source = implode('/', $args);
 
-  if (user_access('view imagecache '. $preset)) {
+  if (user_access('view imagecache '. $preset) && !in_array(-1, module_invoke_all('file_download', $source))) {
     _imagecache_cache($preset, $source);
   }
   else {