]> git.p6c8.net - jirafeau_mojo42.git/commitdiff
remove option which shows download page
authorJerome Jutteau <mojo@couak.net>
Tue, 7 Apr 2015 11:36:45 +0000 (13:36 +0200)
committerJerome Jutteau <mojo@couak.net>
Tue, 7 Apr 2015 11:36:45 +0000 (13:36 +0200)
This commit make Jirafeau to always have the download page link available.
This option is maybe not really usefull anymore as the user already have a
download link and a preview link after the upload.

f.php
index.php
lib/config.original.php

diff --git a/f.php b/f.php
index 31b5d06acdac103132eaedcfdc5558b1e7997ab3..59717b9cd2c0b1dadc8a905f6aff38a94ac3b6d3 100644 (file)
--- a/f.php
+++ b/f.php
@@ -152,7 +152,7 @@ if (!empty ($link['key']))
             echo '&amp;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='
index 1a5c6aac7eeda0dae9c8369491a3cf37a03afbdf..dade552fd4940c8844c5b90950ba3bc7b34b4d78 100644 (file)
--- a/index.php
+++ b/index.php
@@ -97,13 +97,11 @@ if (jirafeau_has_upload_password ($cfg))
     <p><?php echo t('File uploaded !') ?></p>
     <br />
 
-    <?php if ($cfg['download_page'] == true) { ?>
     <div id="upload_finished_download_page">
     <?php echo t('Download page') ?>
     <p><a id="upload_link" href=""></a></p>
     <br />
     </div>
-    <?php } ?>
 
     <div id="upload_password_page">
     <p><?php echo t('Download page') ?>:</p>
index 7eaa6c473dfdc417a9beac566f9f472257550f69..f731171e23b8f2c4d47d3b59c2f6d55ec0dc15c9 100644 (file)
@@ -37,8 +37,6 @@ $cfg['lang'] = 'auto';
 $cfg['style'] = 'courgette';
 /* Propose a preview link if file type is previewable is set to true. */
 $cfg['preview'] = true;
-/* Download page: propose a link to a download page is set to true. */
-$cfg['download_page'] = true;
 /* Encryption feature. disable it by default.
  * By enabling it, file-level deduplication won't work.
  */

patrick-canterino.de