diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2009-08-12 10:30:37 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2009-08-12 10:30:37 +0000 |
commit | 2d0d35db48b0c3aae9952e1cf805beebe222958c (patch) | |
tree | 343f1ecf29ef00e378429edec6746161a3a00765 /phpBB/includes/functions.php | |
parent | 91b91494e201ee33d06fa86bc608f6f9fc45bdaa (diff) | |
download | forums-2d0d35db48b0c3aae9952e1cf805beebe222958c.tar forums-2d0d35db48b0c3aae9952e1cf805beebe222958c.tar.gz forums-2d0d35db48b0c3aae9952e1cf805beebe222958c.tar.bz2 forums-2d0d35db48b0c3aae9952e1cf805beebe222958c.tar.xz forums-2d0d35db48b0c3aae9952e1cf805beebe222958c.zip |
populate who is online only where required
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9961 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 16 |
1 files changed, 12 insertions, 4 deletions
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) * } * </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); |