mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Minor change: do not display the "lookup ip" link if the IP has already been resolved
git-svn-id: file:///svn/phpbb/trunk@4083 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
da2c292d2d
commit
f0c133a559
2 changed files with 5 additions and 8 deletions
|
@ -1403,6 +1403,7 @@ switch ($mode)
|
|||
|
||||
case 'post_details':
|
||||
mcp_header('mcp_post.html', 'm_', TRUE);
|
||||
$rdns_ip_num = (!empty($_GET['rdns'])) ? $_GET['rdns'] : '';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'FORUM_NAME' => $forum_info['forum_name'],
|
||||
|
@ -1449,7 +1450,7 @@ switch ($mode)
|
|||
'POST_SUBJECT' => $post_subject,
|
||||
'MESSAGE' => $message,
|
||||
|
||||
'U_LOOKUP_ALL' => $mcp_url . '&mode=post_details&rdns=all#ip',
|
||||
'U_LOOKUP_ALL' => ($rdns_ip_num == 'all') ? '' : $mcp_url . '&mode=post_details&rdns=all#ip',
|
||||
|
||||
'SEARCH_IMG' => $user->img('btn_search', 'SEARCH_USER_POSTS')
|
||||
));
|
||||
|
@ -1490,7 +1491,6 @@ switch ($mode)
|
|||
$result = $db->sql_query($sql);
|
||||
|
||||
$i = 0;
|
||||
$rdns_ip_num = (!empty($_GET['rdns'])) ? $_GET['rdns'] : '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$ip = ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? @gethostbyaddr($row['poster_ip']) . ' (' . $row['poster_ip'] . ')' : $row['poster_ip'];
|
||||
|
@ -1499,7 +1499,7 @@ switch ($mode)
|
|||
'S_ROW_COUNT' => $i++,
|
||||
'IP' => $ip,
|
||||
'POSTS' => $row['postings'] . ' ' . (($row['postings'] == 1) ? $user->lang['POST'] : $user->lang['POSTS']),
|
||||
'U_LOOKUP_IP' => $mcp_url . '&mode=post_details&rdns=' . $row['poster_ip'] . '#ip'
|
||||
'U_LOOKUP_IP' => ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? '' : $mcp_url . '&mode=post_details&rdns=' . $row['poster_ip'] . '#ip'
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -2170,9 +2170,6 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
$where_sql forum_id IN (" . (($forum_id) ? $forum_id : implode(', ', get_forum_list('m_'))) . ')
|
||||
AND log_time >= ' . $min_time;
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error(":: DEBUG ::<br /><br />Unkown mode '$mode' in mcp_sorting()");
|
||||
}
|
||||
|
||||
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<!-- END userrow -->
|
||||
<tr>
|
||||
<td height="28" class="cat"><b class="gen">{L_OTHER_IPS}</b></td>
|
||||
<td class="cat" width="10%" nowrap="nowrap"><span class="gen">[ <a href="{U_LOOKUP_ALL}">{L_LOOKUP_ALL}</a> ]</span></td>
|
||||
<td class="cat" width="10%" nowrap="nowrap"><!-- IF U_LOOKUP_ALL --><span class="gen">[ <a href="{U_LOOKUP_ALL}">{L_LOOKUP_ALL}</a> ]</span><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<!-- BEGIN iprow -->
|
||||
<!-- IF iprow.S_ROW_COUNT is even -->
|
||||
|
@ -60,7 +60,7 @@
|
|||
<tr class="row2">
|
||||
<!-- ENDIF -->
|
||||
<td><span class="gen">{iprow.IP} [ {iprow.POSTS} ]</span></td>
|
||||
<td align="center"><span class="gen">[ <a href="{iprow.U_LOOKUP_IP}">{L_LOOKUP_IP}</a> ]</span></td>
|
||||
<td align="center"><!-- IF iprow.U_LOOKUP_IP --><span class="gen">[ <a href="{iprow.U_LOOKUP_IP}">{L_LOOKUP_IP}</a> ]</span><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<!-- END iprow -->
|
||||
</table>
|
||||
|
|
Loading…
Add table
Reference in a new issue