From f0c133a55954c479462cbb356f40c42237b52d6c Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Thu, 5 Jun 2003 19:12:05 +0000 Subject: [PATCH] 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 --- phpBB/mcp.php | 9 +++------ phpBB/templates/subSilver/mcp_post.html | 4 ++-- 2 files changed, 5 insertions(+), 8 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 . '&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 ::

Unkown mode '$mode' in mcp_sorting()"); } $sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't'; diff --git a/phpBB/templates/subSilver/mcp_post.html b/phpBB/templates/subSilver/mcp_post.html index 80883acec0..3284dea2b0 100644 --- a/phpBB/templates/subSilver/mcp_post.html +++ b/phpBB/templates/subSilver/mcp_post.html @@ -51,7 +51,7 @@ {L_OTHER_IPS} - [ {L_LOOKUP_ALL} ] + [ {L_LOOKUP_ALL} ] @@ -60,7 +60,7 @@ {iprow.IP} [ {iprow.POSTS} ] - [ {L_LOOKUP_IP} ] + [ {L_LOOKUP_IP} ]