mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
feat: Added ability to hide peer country in peer list (#1891)
* feat: Added ability to hide peer country in peer list * Update displaying_torrent.php * Update displaying_torrent.php * Updated * Update usercp_register.tpl * Update main.php * Update functions.php
This commit is contained in:
parent
f5d65b8911
commit
2555ebce47
5 changed files with 30 additions and 3 deletions
|
@ -197,7 +197,8 @@ $bf['user_opt'] = [
|
|||
'dis_post_edit' => 13, // [PROHIBITIONS] Block editing own posts / topics
|
||||
'user_dls' => 14, // [SETTINGS] Hide list of "Current downloads" in my profile
|
||||
'user_retracker' => 15, // [SETTINGS] Add my retracker into downloaded torrent files
|
||||
'user_hide_torrent_client' => 16 // [SETTINGS] Option to hide user's torrent client in peer list
|
||||
'user_hide_torrent_client' => 16, // [SETTINGS] Option to hide user's torrent client in peer list
|
||||
'user_hide_peer_country' => 17 // [SETTINGS] Option to hide user's country name in peer list
|
||||
];
|
||||
|
||||
function bit2dec($bit_num)
|
||||
|
@ -602,7 +603,13 @@ function bt_show_ip($ip, $port = '')
|
|||
|
||||
if (IS_AM) {
|
||||
$ip = \TorrentPier\Helpers\IPHelper::long2ip_extended($ip);
|
||||
$ip .= ($port) ? ":$port" : '';
|
||||
|
||||
// Wrap IPv6 address in square brackets
|
||||
if ($port && str_contains($ip, ':')) {
|
||||
$ip = "[$ip]";
|
||||
}
|
||||
$ip .= $port ? ":$port" : '';
|
||||
|
||||
return $ip;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue