1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

r9961 - also set item name in page_header parameter for better implementation of #31975

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9991 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Joas Schilling 2009-08-15 14:18:19 +00:00
parent 74ee1405f3
commit ee1ae00e03

View File

@ -3895,7 +3895,7 @@ function phpbb_optionset($bit, $set, $data)
/**
* Generate page header
*/
function page_header($page_title = '', $display_online_list = true, $forum_id = 0)
function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
{
global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;
@ -3937,32 +3937,10 @@ function page_header($page_title = '', $display_online_list = true, $forum_id =
{
/**
* Load online data:
* For obtaining another session column use the following code, whereby the column is session_{$item}_id.
* Put the code directly after $item = 'forum';
*
* <code>
* $my_item_id = request_var('my_item_id', 0);
*
* if ($my_item_id > 0)
* {
* // would revolve to the column session_myitem_id in the SESSIONS_TABLE
* $item = 'myitem';
* $item_id = $my_item_id;
* }
* </code>
* For obtaining another session column use $item and $item_id in the function-parameter, whereby the column is session_{$item}_id.
*/
$item_id = max($item_id, 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);