misc: Minor improvements

This commit is contained in:
Roman Kelesidis 2025-05-04 12:32:37 +03:00
commit a38744eb04

View file

@ -465,7 +465,7 @@ 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 (IS_AM || $peer['user_id'] == $userdata['user_id'] || !bf($peer['user_opt'], 'user_opt', 'user_hide_peer_country')) {
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) { if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
if (isset($infoByIP['countryCode'])) { if (!empty($infoByIP['countryCode'])) {
$peerCountry = render_flag($infoByIP['countryCode']); $peerCountry = render_flag($infoByIP['countryCode']);
} }
} }