diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-05-02 15:01:31 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-05-02 15:01:31 -0700 |
commit | 9879d29f731570a34b24c4eae4cc8cb30c7a5082 (patch) | |
tree | b28fe3274dca5fb773ec91718f30a617b275fd2e /includes/file.inc | |
parent | b1f01b20ea67f6494421765b17afa17394e7a4b0 (diff) | |
download | brdo-9879d29f731570a34b24c4eae4cc8cb30c7a5082.tar.gz brdo-9879d29f731570a34b24c4eae4cc8cb30c7a5082.tar.bz2 |
Drupal 7.13
Diffstat (limited to 'includes/file.inc')
-rw-r--r-- | includes/file.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/includes/file.inc b/includes/file.inc index 7fd6c71c9..676b32f15 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -1971,7 +1971,9 @@ function file_download() { $function = $module . '_file_download'; $result = $function($uri); if ($result == -1) { - return drupal_access_denied(); + // Throw away the headers received so far. + $headers = array(); + break; } if (isset($result) && is_array($result)) { $headers = array_merge($headers, $result); @@ -1980,9 +1982,12 @@ function file_download() { if (count($headers)) { file_transfer($uri, $headers); } - return drupal_access_denied(); + drupal_access_denied(); } - return drupal_not_found(); + else { + drupal_not_found(); + } + drupal_exit(); } |