From 1f8ee8517ce67680660ce5f539eb372f4e64129f Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 8 Feb 2004 16:08:52 +0000 Subject: [PATCH] Move ipwhois ... it's used exclusively for "user" activities, makes more sense there git-svn-id: file:///svn/phpbb/trunk@4816 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewonline.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 778e9f889e..a00ca8bc00 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -37,7 +37,7 @@ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC // Whois requested if ($mode == 'whois') { - include($phpbb_root_path.'includes/functions_admin.'.$phpEx); + include($phpbb_root_path.'includes/functions_user.'.$phpEx); $sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s @@ -47,7 +47,8 @@ if ($mode == 'whois') if ($row = $db->sql_fetchrow($result)) { - $whois = ipwhois($row['session_ip']); + $whois = user_ipwhois($row['session_ip']); + $whois = preg_replace('#(\s+?)([\w\-\._\+]+?@[\w\-\.]+?)(\s+?)#s', '\1\2\3', $whois); $whois = preg_replace('#(\s+?)(http://.*?)(\s+?)#s', '\1\2\3', $whois);