Update modcp.php

This commit is contained in:
Roman Kelesidis 2024-04-30 14:56:46 +07:00
parent 173eff25d8
commit 0ec87bae77

View File

@ -724,9 +724,11 @@ switch ($mode)
continue;
}
$no_lookup = false;
if (!$ip = decode_ip($row['poster_ip']))
{
$ip = $lang['NOT_AVAILABLE'];
$no_lookup = true;
}
$ip = ( $rdns_ip_num == $ip || $rdns_ip_num == 'all') ? gethostbyaddr($ip) : $ip;
@ -734,8 +736,9 @@ switch ($mode)
'ROW_CLASS' => !($i % 2) ? 'row4' : 'row5',
'IP' => $ip,
'POSTS' => $row['postings'],
'U_LOOKUP_IP' => "modcp.php?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $ip . "&sid=" . $userdata['session_id'],
'U_LOOKUP_IP' => (!$no_lookup) ? "modcp.php?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $ip . "&sid=" . $userdata['session_id'] : '',
));
unset($no_lookup);
$i++;
}