From c4ad384342147986387ab03b419b81ff5cd847d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8nstantine=20Kovalensky?= <45331093+kovalensky@users.noreply.github.com> Date: Wed, 8 Nov 2023 23:08:31 +0400 Subject: [PATCH] Show client information for file list (#1066) --- library/includes/file_list_v2.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/library/includes/file_list_v2.php b/library/includes/file_list_v2.php index 6b7174a91..c4257e06d 100644 --- a/library/includes/file_list_v2.php +++ b/library/includes/file_list_v2.php @@ -17,7 +17,7 @@ $row = DB()->fetch_row($sql); if (empty($row) || empty($row['physical_filename'])) { http_response_code(404); - die('Topic id is missing'); + die('Valid topic id is missing'); } if (empty($row['info_hash_v2'])) { @@ -36,6 +36,7 @@ $file_list = $torrent->fileTreeTable($tor['info']['file tree']); $date = ''; $name = htmlCHR($tor['info']['name'] ?? ''); +$client = htmlCHR(substr($tor['created by'], 0, 20) ?? 'unknown'); if (isset($tor['creation date']) && is_numeric($tor['creation date'])) { $date = date("d M Y | G:i:s T", $tor['creation date']); } @@ -84,7 +85,10 @@ echo "
-

Document name: $name | Date: ($date) | Size: $size


+

Document name: $name | Date: ($date) | Size: $size +

+

Created by: $client

+
"; @@ -92,7 +96,7 @@ echo implode('', $file_list['list']); echo '
PathSizeHash ?
-

Generated by TorrentPier

+

Generated by TorrentPier

';