1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-27 18:20:08 +02:00

#i51 - #i63 - #i64

git-svn-id: file:///svn/phpbb/trunk@8095 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-09-21 15:05:04 +00:00
parent 69d29e9282
commit 7be10f7bf5
4 changed files with 25 additions and 30 deletions

View File

@@ -52,7 +52,7 @@ if (!isset($sort_key_text[$sort_key]))
$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
// Whois requested
if ($mode == 'whois')
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -64,14 +64,7 @@ if ($mode == 'whois')
if ($row = $db->sql_fetchrow($result))
{
$whois = user_ipwhois($row['session_ip']);
$whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1<a href="mailto:\2">\2</a>\3', $whois);
$whois = preg_replace('#(\s)(http:/{2}[^\s]*)(\s)#', '\1<a href="\2">\2</a>\3', $whois);
$template->assign_vars(array(
'WHOIS' => trim($whois))
);
$template->assign_var('WHOIS', user_ipwhois($row['session_ip']));
}
$db->sql_freeresult($result);