diff --git a/phpBB/faq.php b/phpBB/faq.php index 04353de50f..0a04bad8eb 100644 --- a/phpBB/faq.php +++ b/phpBB/faq.php @@ -77,7 +77,7 @@ $template->assign_vars(array( 'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false, )); -page_header($l_title); +page_header($l_title, false); $template->set_filenames(array( 'body' => 'faq_body.html') 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) * } * */ - - $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); diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 51301d6ffe..424ea27739 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1531,7 +1531,7 @@ switch ($mode) } // Output the page -page_header($page_title); +page_header($page_title, false); $template->set_filenames(array( 'body' => $template_html) diff --git a/phpBB/posting.php b/phpBB/posting.php index bea534c5dd..a175ebba51 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1492,7 +1492,7 @@ $allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); // Output page ... -page_header($page_title); +page_header($page_title, false); $template->set_filenames(array( 'body' => 'posting_body.html') @@ -1520,7 +1520,7 @@ function upload_popup($forum_style = 0) ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting'); - page_header($user->lang['PROGRESS_BAR']); + page_header($user->lang['PROGRESS_BAR'], false); $template->set_filenames(array( 'popup' => 'posting_progress_bar.html') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 2668919e1d..ad1bb64ff2 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -142,7 +142,7 @@ else } // Dump out the page header and load viewforum template -page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name']); +page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id); $template->set_filenames(array( 'body' => 'viewforum_body.html') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 51a8682229..10f782089b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1675,7 +1675,7 @@ if (empty($_REQUEST['f'])) } // Output the page -page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title']); +page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id); $template->set_filenames(array( 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')