From 2d0d35db48b0c3aae9952e1cf805beebe222958c Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 12 Aug 2009 10:30:37 +0000 Subject: populate who is online only where required git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9961 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 6c651b2b86..4f88ee9625 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3861,7 +3861,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' /** * Generate page header */ -function page_header($page_title = '', $display_online_list = true) +function page_header($page_title = '', $display_online_list = true, $forum_id = 0) { global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; @@ -3917,10 +3917,18 @@ function page_header($page_title = '', $display_online_list = true) * } * */ - - $item_id = max(request_var('f', 0), 0); + + if ($forum_id) + { + $item_id = max($forum_id, 0); + } + else + { + $item_id = 0; + } + + // workaround legacy code $item = 'forum'; - $online_users = obtain_users_online($item_id, $item); $user_online_strings = obtain_users_online_string($online_users, $item_id, $item); -- cgit v1.2.1