Update displaying_torrent.php

This commit is contained in:
Roman Kelesidis 2025-05-05 18:42:45 +03:00
commit 45fcc412ab

View file

@ -463,10 +463,12 @@ if ($tor_reged && $tor_info) {
} }
$peerCountry = $lang['UNKNOWN']; $peerCountry = $lang['UNKNOWN'];
if (IS_AM || $peer['user_id'] == $userdata['user_id'] || !bf($peer['user_opt'], 'user_opt', 'user_hide_peer_country')) { if ($bb_cfg['ip2country_settings']['enabled']) {
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) { if (IS_AM || $peer['user_id'] == $userdata['user_id'] || !bf($peer['user_opt'], 'user_opt', 'user_hide_peer_country')) {
if (!empty($infoByIP['countryCode'])) { if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
$peerCountry = render_flag($infoByIP['countryCode'], false); if (!empty($infoByIP['countryCode'])) {
$peerCountry = render_flag($infoByIP['countryCode'], false);
}
} }
} }
} }