Minor improvements (#175)

This commit is contained in:
Roman Kelesidis 2023-06-14 20:54:06 +07:00 committed by GitHub
parent 20b24119f3
commit 98955ece12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -73,13 +73,13 @@ switch ($mode)
$reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ."
WHERE user_reg_ip = '{$profiledata['user_reg_ip']}'
AND user_reg_ip != ''
AND user_reg_ip != 0
AND user_id != {$profiledata['user_id']}
ORDER BY username ASC");
$last_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " .BB_USERS ."
WHERE user_last_ip = '{$profiledata['user_last_ip']}'
AND user_last_ip != ''
AND user_last_ip != 0
AND user_id != {$profiledata['user_id']}");
$link_reg_ip = $link_last_ip = '';

View File

@ -673,7 +673,10 @@ switch ($mode)
bb_die($lang['NO_SUCH_POST']);
}
$ip_this_post = decode_ip($post_row['poster_ip']);
if (!$ip_this_post = decode_ip($post_row['poster_ip']))
{
$ip_this_post = $lang['NOT_AVAILABLE'];
}
$ip_this_post = ($rdns_ip_num == $ip_this_post) ? gethostbyaddr($ip_this_post) : $ip_this_post;
$poster_id = $post_row['poster_id'];
@ -708,7 +711,10 @@ switch ($mode)
continue;
}
$ip = decode_ip($row['poster_ip']);
if (!$ip = decode_ip($row['poster_ip']))
{
$ip = $lang['NOT_AVAILABLE'];
}
$ip = ( $rdns_ip_num == $ip || $rdns_ip_num == 'all') ? gethostbyaddr($ip) : $ip;
$template->assign_block_vars('iprow', array(
@ -850,4 +856,4 @@ require(PAGE_HEADER);
$template->pparse('body');
require(PAGE_FOOTER);
require(PAGE_FOOTER);