diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-09-21 15:05:04 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-09-21 15:05:04 +0000 |
commit | 7be10f7bf532d6b137f86a7b73d00922ab099687 (patch) | |
tree | b80d3798869c7b814e6bde4013e1cd6231996829 /phpBB/viewonline.php | |
parent | put expressions for ip validation into our get_preg_ function. (diff) | |
download | phpbb-7be10f7bf532d6b137f86a7b73d00922ab099687.tar.gz phpbb-7be10f7bf532d6b137f86a7b73d00922ab099687.tar.bz2 phpbb-7be10f7bf532d6b137f86a7b73d00922ab099687.zip |
#i51 - #i63 - #i64
git-svn-id: file:///svn/phpbb/trunk@8095 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewonline.php')
-rw-r--r-- | phpBB/viewonline.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 6da8e81dbd..8690739d91 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -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); |