]> git.p6c8.net - jirafeau_project.git/blobdiff - f.php
Merge remote-tracking branch 'origin/master'
[jirafeau_project.git] / f.php
diff --git a/f.php b/f.php
index 31b5d06acdac103132eaedcfdc5558b1e7997ab3..99a67df9dd1fcd968d7830952e352d965a5b6b05 100644 (file)
--- a/f.php
+++ b/f.php
@@ -152,7 +152,7 @@ if (!empty ($link['key']))
             echo '&k=' . urlencode($crypt_key);
 ?>';
         document.getElementById('submit_download').submit ();"/><?php
-        if ($cfg['download_page'] && $cfg['preview'] && jirafeau_is_viewable($link['mime_type']))
+        if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type']))
         {
             ?><input type="submit" id = "submit_preview"  value="<?php echo t('Preview'); ?>"
             onclick="document.getElementById('submit_post').action='
@@ -182,7 +182,7 @@ 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 '<div>' .
@@ -216,7 +216,7 @@ if ($cfg['download_page'] && !$password_challenged && !$do_download && !$do_prev
 ?>';
         document.getElementById('submit_post').submit ();"/><?php
 
-        if ($cfg['download_page'] && $cfg['preview'] && jirafeau_is_viewable($link['mime_type']))
+        if ($cfg['preview'] && jirafeau_is_viewable($link['mime_type']))
         {
             ?><input type="submit" id = "submit_preview"  value="<?php echo t('Preview'); ?>"
             onclick="document.getElementById('submit_post').action='
@@ -240,6 +240,7 @@ if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'] || $do_downlo
 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'])

patrick-canterino.de