misc: Minor improvements (#1892)

This commit is contained in:
Roman Kelesidis 2025-05-04 12:27:13 +03:00 committed by GitHub
commit 1e5b93d2c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -464,14 +464,12 @@ if ($tor_reged && $tor_info) {
$peerCountry = $lang['UNKNOWN'];
if (IS_AM || $peer['user_id'] == $userdata['user_id'] || !bf($peer['user_opt'], 'user_opt', 'user_hide_peer_country')) {
if ($port !== false && $ip !== false) {
if ($infoByIP = infoByIP($ip, $port)) {
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
if (isset($infoByIP['countryCode'])) {
$peerCountry = render_flag($infoByIP['countryCode']);
}
}
}
}
$template->assign_block_vars("$x_full.$x_row", [
'ROW_BGR' => $row_bgr,