Simplified IPHelper (#712)

This commit is contained in:
Roman Kelesidis 2023-05-23 22:23:00 +07:00 committed by GitHub
commit d9d38935b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 17 additions and 90 deletions

View file

@ -589,7 +589,7 @@ switch ($mode) {
bb_die($lang['NO_SUCH_POST']);
}
if (!$ip_this_post = \TorrentPier\Helpers\IPHelper::decodeIP($post_row['poster_ip'])) {
if (!$ip_this_post = \TorrentPier\Helpers\IPHelper::long2ip($post_row['poster_ip'])) {
$ip_this_post = $lang['NOT_AVAILABLE'];
}
@ -623,7 +623,7 @@ switch ($mode) {
continue;
}
if (!$ip = \TorrentPier\Helpers\IPHelper::decodeIP($row['poster_ip'])) {
if (!$ip = \TorrentPier\Helpers\IPHelper::long2ip($row['poster_ip'])) {
$ip = $lang['NOT_AVAILABLE'];
}
$ip = ($rdns_ip_num == $ip || $rdns_ip_num == 'all') ? gethostbyaddr($ip) : $ip;