From: Joas S. <nic...@ph...> - 2009-08-15 14:19:07
|
Author: nickvergessen Date: Sat Aug 15 15:18:19 2009 New Revision: 9991 Log: r9961 - also set item name in page_header parameter for better implementation of #31975 Authorised by: AcydBurn Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions.php Sat Aug 15 15:18:19 2009 *************** *** 3895,3901 **** /** * Generate page header */ ! function page_header($page_title = '', $display_online_list = true, $forum_id = 0) { global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path; --- 3895,3901 ---- /** * Generate page header */ ! 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,3968 **** { /** * 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> */ - 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); --- 3937,3946 ---- { /** * Load online data: ! * 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); $online_users = obtain_users_online($item_id, $item); $user_online_strings = obtain_users_online_string($online_users, $item_id, $item); |