aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_post.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-09-21 15:05:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-09-21 15:05:04 +0000
commit7be10f7bf532d6b137f86a7b73d00922ab099687 (patch)
treeb80d3798869c7b814e6bde4013e1cd6231996829 /phpBB/includes/mcp/mcp_post.php
parent69d29e9282e0fcdbcac0017acea8aaa942ee2623 (diff)
downloadforums-7be10f7bf532d6b137f86a7b73d00922ab099687.tar
forums-7be10f7bf532d6b137f86a7b73d00922ab099687.tar.gz
forums-7be10f7bf532d6b137f86a7b73d00922ab099687.tar.bz2
forums-7be10f7bf532d6b137f86a7b73d00922ab099687.tar.xz
forums-7be10f7bf532d6b137f86a7b73d00922ab099687.zip
#i51 - #i63 - #i64
git-svn-id: file:///svn/phpbb/trunk@8095 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_post.php')
-rw-r--r--phpBB/includes/mcp/mcp_post.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index dd10750d99..b98910f55f 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -36,20 +36,18 @@ function mcp_post_details($id, $mode, $action)
{
case 'whois':
- $ip = request_var('ip', '');
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
-
- $whois = user_ipwhois($ip);
-
- $whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1<a href="mailto:\2">\2</a>\3', $whois);
- $whois = preg_replace('#(\s)(ht{2}p:/{2}\S*)(\s)#', '\1<a href="\2">\2</a>\3', $whois);
-
- $template->assign_vars(array(
- 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id") . '">', '</a>'),
- 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id"),
- 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''),
- 'WHOIS' => trim($whois))
- );
+ if ($auth->acl_get('m_info', $post_info['forum_id']))
+ {
+ $ip = request_var('ip', '');
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id") . '">', '</a>'),
+ 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;mode=$mode&amp;p=$post_id"),
+ 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''),
+ 'WHOIS' => user_ipwhois($ip),
+ ));
+ }
// We're done with the whois page so return
return;