' . t('Access denied') .
' ';
@@ -176,40 +182,50 @@ if (!empty ($link['key']))
}
}
-if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_preview)
+if (!$password_challenged && !$do_download && !$do_preview)
{
require (JIRAFEAU_ROOT.'lib/template/header.php');
echo '';
@@ -220,9 +236,11 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev
header ('HTTP/1.0 200 OK');
header ('Content-Length: ' . $link['file_size']);
if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'] || $do_download)
- header ('Content-Disposition: attachment; filename="' .
- $link['file_name'] . '"');
+ header ('Content-Disposition: attachment; filename="' . $link['file_name'] . '"');
+else
+ header ('Content-Disposition: filename="' . $link['file_name'] . '"');
header ('Content-Type: ' . $link['mime_type']);
+header ('Content-MD5: ' . hex_to_base64($link['md5']));
/* Read encrypted file. */
if ($link['crypted'])
|