diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index 373b6b863..37fdd7f55 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -245,7 +245,7 @@ if ($tor_reged && $tor_info) { 'SHOW_DL_LIST' => true, 'SHOW_DL_LIST_TOR_INFO' => true, - 'TOR_SIZE' => humn_size($tor_size, 1), + 'TOR_SIZE' => humn_size($tor_size, 2), 'TOR_LONGEVITY' => delta_time($tor_info['reg_time']), 'TOR_DOWNLOAD_COUNT' => $download_count, 'TOR_COMPLETED' => $tor_completed_count, @@ -373,8 +373,8 @@ if ($tor_reged && $tor_info) { $peers = $tmp; $template->assign_vars([ - 'TOR_SPEED_UP' => ($tor_speed_up) ? humn_size($tor_speed_up, 0, 'KB') . '/s' : '0 KB/s', - 'TOR_SPEED_DOWN' => ($tor_speed_down) ? humn_size($tor_speed_down, 0, 'KB') . '/s' : '0 KB/s' + 'TOR_SPEED_UP' => ($tor_speed_up) ? humn_size($tor_speed_up, min: 'KB') . '/s' : '0 KB/s', + 'TOR_SPEED_DOWN' => ($tor_speed_down) ? humn_size($tor_speed_down, min: 'KB') . '/s' : '0 KB/s' ]); } @@ -407,7 +407,7 @@ if ($tor_reged && $tor_info) { $template->assign_block_vars((string)$x_full, [ 'SEED_ORD_ACT' => $seed_order_action, - 'SEEDERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s' + 'SEEDERS_UP_TOT' => humn_size($sp_up_tot[$x], min: 'KB') . '/s' ]); if ($ip) { @@ -429,8 +429,8 @@ if ($tor_reged && $tor_info) { $template->assign_block_vars((string)$x_full, [ 'LEECH_ORD_ACT' => $leech_order_action, - 'LEECHERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s', - 'LEECHERS_DOWN_TOT' => humn_size($sp_down_tot[$x], 0, 'KB') . '/s' + 'LEECHERS_UP_TOT' => humn_size($sp_up_tot[$x], min: 'KB') . '/s', + 'LEECHERS_DOWN_TOT' => humn_size($sp_down_tot[$x], min: 'KB') . '/s' ]); if ($ip) { @@ -449,8 +449,8 @@ if ($tor_reged && $tor_info) { $up_tot = ($p_max_up) ? humn_size($p_max_up) : '-'; $down_tot = ($p_max_down) ? humn_size($p_max_down) : '-'; $up_ratio = ($p_max_down) ? round(($p_max_up / $p_max_down), 2) : ''; - $sp_up = ($peer['speed_up']) ? humn_size($peer['speed_up'], 0, 'KB') . '/s' : '-'; - $sp_down = ($peer['speed_down']) ? humn_size($peer['speed_down'], 0, 'KB') . '/s' : '-'; + $sp_up = ($peer['speed_up']) ? humn_size($peer['speed_up'], min: 'KB') . '/s' : '-'; + $sp_down = ($peer['speed_down']) ? humn_size($peer['speed_down'], min: 'KB') . '/s' : '-'; $bgr_class = (!($tr[$x] % 2)) ? $bgr_class_1 : $bgr_class_2; $row_bgr = ($change_peers_bgr_over) ? " class=\"$bgr_class\" onmouseover=\"this.className='$bgr_class_over';\" onmouseout=\"this.className='$bgr_class';\"" : ''; diff --git a/library/includes/functions.php b/library/includes/functions.php index 800c17fef..0e1a2117a 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -876,8 +876,8 @@ function show_bt_userdata($user_id): void 'YS_BONUS' => humn_size($btu['up_bonus_yesterday']), 'YS_POINTS' => $btu['auth_key'] ? $btu['points_yesterday'] : '0.00', - 'SPEED_UP' => humn_size($btu['speed_up'], 0, 'KB') . '/s', - 'SPEED_DOWN' => humn_size($btu['speed_down'], 0, 'KB') . '/s', + 'SPEED_UP' => humn_size($btu['speed_up'], min: 'KB') . '/s', + 'SPEED_DOWN' => humn_size($btu['speed_down'], min: 'KB') . '/s', ]); } diff --git a/library/includes/ucp/viewtorrent.php b/library/includes/ucp/viewtorrent.php index cfcd3cc34..6878423b4 100644 --- a/library/includes/ucp/viewtorrent.php +++ b/library/includes/ucp/viewtorrent.php @@ -60,7 +60,7 @@ if ($releasing) { 'TOR_TYPE' => is_gold($row['tor_type']), 'TOPIC_SEEDERS' => ($row['seeders']) ?: 0, 'TOPIC_LEECHERS' => ($row['leechers']) ?: 0, - 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') . '/s' : '-', + 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], min: 'KB') . '/s' : '-', ]); $releasing_count++; @@ -80,7 +80,7 @@ if ($seeding) { 'TOR_TYPE' => is_gold($row['tor_type']), 'TOPIC_SEEDERS' => ($row['seeders']) ?: 0, 'TOPIC_LEECHERS' => ($row['leechers']) ?: 0, - 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], 0, 'KB') . '/s' : '-', + 'SPEED_UP' => ($row['speed_up']) ? humn_size($row['speed_up'], min: 'KB') . '/s' : '-', ]); $seeding_count++; @@ -103,7 +103,7 @@ if ($leeching) { 'TOR_TYPE' => is_gold($row['tor_type']), 'TOPIC_SEEDERS' => ($row['seeders']) ?: 0, 'TOPIC_LEECHERS' => ($row['leechers']) ?: 0, - 'SPEED_DOWN' => ($row['speed_down']) ? humn_size($row['speed_down'], 0, 'KB') . '/s' : '-', + 'SPEED_DOWN' => ($row['speed_down']) ? humn_size($row['speed_down'], min: 'KB') . '/s' : '-', ]); $leeching_count++; diff --git a/styles/templates/default/viewtopic_torrent.tpl b/styles/templates/default/viewtopic_torrent.tpl index e7f8e8267..8d7b621e4 100644 --- a/styles/templates/default/viewtopic_torrent.tpl +++ b/styles/templates/default/viewtopic_torrent.tpl @@ -23,9 +23,7 @@ ajax.callback.callseed = function (data) { - - {L_DL_LIST_AND_TORRENT_ACTIVITY} - + {L_DL_LIST_AND_TORRENT_ACTIVITY} diff --git a/tracker.php b/tracker.php index 5f3c50d57..3675f7375 100644 --- a/tracker.php +++ b/tracker.php @@ -715,8 +715,8 @@ if ($allowed_forums) { $size = $tor['size']; $tor_magnet = create_magnet($tor['info_hash'], $tor['info_hash_v2'], \TorrentPier\Legacy\Torrent::getPasskey($user_id), html_ent_decode($tor['topic_title'])); $compl = $tor['complete_count']; - $dl_sp = $dl ? humn_size($dl, 0, 'KB') . '/s' : '0 KB/s'; - $ul_sp = $ul ? humn_size($ul, 0, 'KB') . '/s' : '0 KB/s'; + $dl_sp = $dl ? humn_size($dl, min: 'KB') . '/s' : '0 KB/s'; + $ul_sp = $ul ? humn_size($ul, min: 'KB') . '/s' : '0 KB/s'; $dl_class = isset($tor['dl_status']) ? $dl_link_css[$tor['dl_status']] : 'genmed'; $row_class = !($row_num & 1) ? $row_class_1 : $row_class_2;