From ffc7c5c3c6db7773de1c430422a1e08449e24f27 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Wed, 18 Jan 2006 19:18:30 +0000 Subject: [PATCH] - Patch #44011 by Souvent22 et al: critical bugfix: make private downloads work again. --- includes/file.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/file.inc b/includes/file.inc index 28bfb962929a..80fb3f9a3120 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -488,12 +488,12 @@ function file_download() { $list = module_list(); foreach ($list as $module) { $headers = module_invoke($module, 'file_download', $file); - if (empty($headers)) { - drupal_access_denied(); - } - elseif (is_array($headers)) { + if (is_array($headers)) { file_transfer($file, $headers); } + elseif ($headers == -1) { + drupal_access_denied(); + } } } drupal_not_found(); -- GitLab