diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-28 23:30:09 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-28 23:30:09 +0000 |
commit | 19aed179e53f9660a7202e2e50816e1cef0f7be9 (patch) | |
tree | e2707fd68720f206c88f8bcaff6e2fc3173c9c94 /phpBB/viewonline.php | |
parent | 4ded6cf5eef0892f9ef1d7351664e1d78445c419 (diff) | |
download | forums-19aed179e53f9660a7202e2e50816e1cef0f7be9.tar forums-19aed179e53f9660a7202e2e50816e1cef0f7be9.tar.gz forums-19aed179e53f9660a7202e2e50816e1cef0f7be9.tar.bz2 forums-19aed179e53f9660a7202e2e50816e1cef0f7be9.tar.xz forums-19aed179e53f9660a7202e2e50816e1cef0f7be9.zip |
$config to phpbb::$config
git-svn-id: file:///svn/phpbb/trunk@9242 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewonline.php')
-rw-r--r-- | phpBB/viewonline.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 2606bf8aa9..bab4e0315c 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -27,7 +27,7 @@ $session_id = request_var('s', ''); $start = request_var('start', 0); $sort_key = request_var('sk', 'b'); $sort_dir = request_var('sd', 'd'); -$show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0; +$show_guests= (phpbb::$config['load_online_guests']) ? request_var('sg', 0) : 0; // Can this user view profiles/memberlist? if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) @@ -102,7 +102,7 @@ if (!$show_guests) $sql = 'SELECT COUNT(DISTINCT session_ip) as num_guests FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = ' . ANONYMOUS . ' - AND session_time >= ' . (time() - ($config['load_online_time'] * 60)); + AND session_time >= ' . (time() - (phpbb::$config['load_online_time'] * 60)); } else { @@ -111,7 +111,7 @@ if (!$show_guests) SELECT DISTINCT session_ip FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = ' . ANONYMOUS . ' - AND session_time >= ' . (time() - ($config['load_online_time'] * 60)) . + AND session_time >= ' . (time() - (phpbb::$config['load_online_time'] * 60)) . ')'; break; } @@ -124,7 +124,7 @@ if (!$show_guests) $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s WHERE u.user_id = s.session_user_id - AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . + AND s.session_time >= ' . (time() - (phpbb::$config['load_online_time'] * 60)) . ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . ' ORDER BY ' . $order_by; $result = $db->sql_query($sql); @@ -162,7 +162,7 @@ while ($row = $db->sql_fetchrow($result)) $counter++; } - if (!$view_online || $counter > $start + $config['topics_per_page'] || $counter <= $start) + if (!$view_online || $counter > $start + phpbb::$config['topics_per_page'] || $counter <= $start) { continue; } @@ -173,7 +173,7 @@ while ($row = $db->sql_fetchrow($result)) $guest_counter++; $counter++; - if ($counter > $start + $config['topics_per_page'] || $counter <= $start) + if ($counter > $start + phpbb::$config['topics_per_page'] || $counter <= $start) { continue; } @@ -369,7 +369,7 @@ foreach ($vars_online as $l_prefix => $var_ary) } unset($vars_online); -$pagination = generate_pagination(append_sid('viewonline', "sg=$show_guests&sk=$sort_key&sd=$sort_dir"), $counter, $config['topics_per_page'], $start); +$pagination = generate_pagination(append_sid('viewonline', "sg=$show_guests&sk=$sort_key&sd=$sort_dir"), $counter, phpbb::$config['topics_per_page'], $start); // Grab group details for legend display if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) @@ -418,7 +418,7 @@ $template->assign_vars(array( 'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_counter), 'LEGEND' => $legend, 'PAGINATION' => $pagination, - 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($counter, phpbb::$config['topics_per_page'], $start), 'U_SORT_USERNAME' => append_sid('viewonline', 'sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&sg=' . ((int) $show_guests)), 'U_SORT_UPDATED' => append_sid('viewonline', 'sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&sg=' . ((int) $show_guests)), @@ -426,11 +426,11 @@ $template->assign_vars(array( 'U_SWITCH_GUEST_DISPLAY' => append_sid('viewonline', 'sg=' . ((int) !$show_guests)), 'L_SWITCH_GUEST_DISPLAY' => ($show_guests) ? $user->lang['HIDE_GUESTS'] : $user->lang['DISPLAY_GUESTS'], - 'S_SWITCH_GUEST_DISPLAY' => ($config['load_online_guests']) ? true : false) + 'S_SWITCH_GUEST_DISPLAY' => (phpbb::$config['load_online_guests']) ? true : false) ); // We do not need to load the who is online box here. ;) -$config['load_online'] = false; +phpbb::$config['load_online'] = false; // Output the page page_header($user->lang['WHO_IS_ONLINE']); |