1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

populate who is online only where required

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9961 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof
2009-08-12 10:30:37 +00:00
parent 91b91494e2
commit 2d0d35db48
6 changed files with 18 additions and 10 deletions

View File

@@ -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)
* }
* </code>
*/
$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);