aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-06-05 19:12:05 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-06-05 19:12:05 +0000
commitf0c133a55954c479462cbb356f40c42237b52d6c (patch)
treef1cc9feca08a66cc918a2384b3b2ed614a239c00 /phpBB/mcp.php
parentda2c292d2d68e5b7eaf61e345f4f8fddfba57696 (diff)
downloadforums-f0c133a55954c479462cbb356f40c42237b52d6c.tar
forums-f0c133a55954c479462cbb356f40c42237b52d6c.tar.gz
forums-f0c133a55954c479462cbb356f40c42237b52d6c.tar.bz2
forums-f0c133a55954c479462cbb356f40c42237b52d6c.tar.xz
forums-f0c133a55954c479462cbb356f40c42237b52d6c.zip
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
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 22c9a5e90e..ac4e8a7395 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -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 . '&amp;mode=post_details&amp;rdns=all#ip',
+ 'U_LOOKUP_ALL' => ($rdns_ip_num == 'all') ? '' : $mcp_url . '&amp;mode=post_details&amp;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 . '&amp;mode=post_details&amp;rdns=' . $row['poster_ip'] . '#ip'
+ 'U_LOOKUP_IP' => ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? '' : $mcp_url . '&amp;mode=post_details&amp;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';