X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/5ef1b7a136f3abc7f824fa01d03ac0e06cb811bf..9c3b702ab8f82079ddaa9a12413802de946d8ecc:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index 4991f23..f70e0de 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -3,7 +3,7 @@ * Jirafeau, your web file repository * Copyright (C) 2008 Julien "axolotl" BERNARD * Copyright (C) 2015 Jerome Jutteau - * Copyright (C) 2015 Nicola Spanti (RyDroid) + * Copyright (C) 2024 Jirafeau project (see AUTHORS.md) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -744,7 +744,7 @@ function jirafeau_get_link($hash) } /** - * List files ii folder in admin interface. + * List files in admin interface. */ function jirafeau_admin_list($name, $file_hash, $link_hash) { @@ -780,25 +780,39 @@ function jirafeau_admin_list($name, $file_hash, $link_hash) } /* Print link information. */ echo ''; - echo '' . - '' . jirafeau_escape($l['file_name']) . '
'; + echo ''; + + if (!$l['crypted'] && !$l['crypted_legacy']) { + echo'' . jirafeau_escape($l['file_name']) . ''; + } + else { + echo jirafeau_escape($l['file_name']); + } + + echo '
'; + echo t('TYPE') . ': ' . jirafeau_escape($l['mime_type']) . '
'; echo t('SIZE') . ': ' . jirafeau_human_size($l['file_size']) . '
'; echo t('EXPIRE') . ': ' . ($l['time'] == -1 ? '∞' : jirafeau_get_datetimefield($l['time'])) . '
'; - echo t('ONETIME') . ': ' . ($l['onetime'] == 'O' ? 'Yes' : 'No') . '
'; + echo t('ONETIME') . ': ' . ($l['onetime'] == 'O' ? t('YES') : t('NO')) . '
'; + echo t('ENCRYPTED') . ': ' . (($l['crypted'] || $l['crypted_legacy']) ? t('YES') : t('NO')) . '
'; echo t('UPLOAD_DATE') . ': ' . jirafeau_get_datetimefield($l['upload_date']) . '
'; if (strlen($l['ip']) > 0) { echo t('ORIGIN') . ': ' . $l['ip'] . '
'; } echo ''; + + if (!$l['crypted'] && !$l['crypted_legacy']) { + echo '
' . + '' . + '' . + jirafeau_admin_csrf_field() . + '' . + '
'; + } + echo '
' . - '' . - '' . - jirafeau_admin_csrf_field() . - '' . - '
' . - '
' . '' . '' . jirafeau_admin_csrf_field() .