mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Update functions.php
This commit is contained in:
parent
560f6142ee
commit
683a916090
1 changed files with 7 additions and 1 deletions
|
@ -603,7 +603,13 @@ function bt_show_ip($ip, $port = '')
|
||||||
|
|
||||||
if (IS_AM) {
|
if (IS_AM) {
|
||||||
$ip = \TorrentPier\Helpers\IPHelper::long2ip_extended($ip);
|
$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;
|
return $ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue