aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2009-08-15 14:18:19 +0000
committerJoas Schilling <nickvergessen@gmx.de>2009-08-15 14:18:19 +0000
commitee1ae00e033e376b717756d152c461b014da053a (patch)
tree3d21d827824e7c9f44c26ac6bc62c48abd80bf99
parent74ee1405f3e13064040ef86867cff61199de978d (diff)
downloadforums-ee1ae00e033e376b717756d152c461b014da053a.tar
forums-ee1ae00e033e376b717756d152c461b014da053a.tar.gz
forums-ee1ae00e033e376b717756d152c461b014da053a.tar.bz2
forums-ee1ae00e033e376b717756d152c461b014da053a.tar.xz
forums-ee1ae00e033e376b717756d152c461b014da053a.zip
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
-rw-r--r--phpBB/includes/functions.php28
1 files changed, 3 insertions, 25 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 49e9f41704..2f8a3ddda6 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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);