diff options
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 173 |
1 files changed, 64 insertions, 109 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 74420a25c7..0d6e9afd54 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -2,9 +2,8 @@ /** * * @package phpBB3 -* @version $Id$ * @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ @@ -152,26 +151,12 @@ if ($view && !$post_id) else { $topic_id = $row['topic_id']; - - // Check for global announcement correctness? - if (!$row['forum_id'] && !$forum_id) - { - trigger_error('NO_TOPIC'); - } - else if ($row['forum_id']) - { - $forum_id = $row['forum_id']; - } + $forum_id = $row['forum_id']; } } } - // Check for global announcement correctness? - if ((!isset($row) || !$row['forum_id']) && !$forum_id) - { - trigger_error('NO_TOPIC'); - } - else if (isset($row) && $row['forum_id']) + if (isset($row) && $row['forum_id']) { $forum_id = $row['forum_id']; } @@ -186,13 +171,6 @@ $sql_array = array( 'FROM' => array(FORUMS_TABLE => 'f'), ); -// Firebird handles two columns of the same name a little differently, this -// addresses that by forcing the forum_id to come from the forums table. -if ($db->sql_layer === 'firebird') -{ - $sql_array['SELECT'] = 'f.forum_id AS forum_id, ' . $sql_array['SELECT']; -} - // The FROM-Order is quite important here, else t.* columns can not be correctly bound. if ($post_id) { @@ -247,26 +225,8 @@ else $sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id"; } -$sql_array['WHERE'] .= ' AND (f.forum_id = t.forum_id'; - -if (!$forum_id) -{ - // If it is a global announcement make sure to set the forum id to a postable forum - $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . ' - AND f.forum_type = ' . FORUM_POST . ')'; -} -else -{ - $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . " - AND f.forum_id = $forum_id)"; -} - -$sql_array['WHERE'] .= ')'; +$sql_array['WHERE'] .= ' AND f.forum_id = t.forum_id'; -// Join to forum table on topic forum_id unless topic forum_id is zero -// whereupon we join on the forum_id passed as a parameter ... this -// is done so navigation, forum name, etc. remain consistent with where -// user clicked to view a global topic $sql = $db->sql_build_query('SELECT', $sql_array); $result = $db->sql_query($sql); $topic_data = $db->sql_fetchrow($result); @@ -489,7 +449,9 @@ $viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&a // Are we watching this topic? $s_watching_topic = array( 'link' => '', + 'link_toggle' => '', 'title' => '', + 'title_toggle' => '', 'is_watching' => false, ); @@ -557,19 +519,31 @@ gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']); // Quick mod tools $allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false; -$topic_mod = ''; -$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : ''; -$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . $user->lang['DELETE_TOPIC'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_POSTS'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge_topic">' . $user->lang['MERGE_TOPIC'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="fork">' . $user->lang['FORK_TOPIC'] . '</option>' : ''; -$topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '<option value="make_normal">' . $user->lang['MAKE_NORMAL'] . '</option>' : ''; -$topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '<option value="make_sticky">' . $user->lang['MAKE_STICKY'] . '</option>' : ''; -$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '<option value="make_announce">' . $user->lang['MAKE_ANNOUNCE'] . '</option>' : ''; -$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . $user->lang['MAKE_GLOBAL'] . '</option>' : ''; -$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : ''; +$quickmod_array = array( +// 'key' => array('LANG_KEY', $userHasPermissions), + + 'lock' => array('LOCK_TOPIC', ($topic_data['topic_status'] == ITEM_UNLOCKED) && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED))), + 'unlock' => array('UNLOCK_TOPIC', ($topic_data['topic_status'] != ITEM_UNLOCKED) && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED))), + 'delete_topic' => array('DELETE_TOPIC', $auth->acl_get('m_delete', $forum_id)), + 'move' => array('MOVE_TOPIC', $auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED), + 'split' => array('SPLIT_TOPIC', $auth->acl_get('m_split', $forum_id)), + 'merge' => array('MERGE_POSTS', $auth->acl_get('m_merge', $forum_id)), + 'merge_topic' => array('MERGE_TOPIC', $auth->acl_get('m_merge', $forum_id)), + 'fork' => array('FORK_TOPIC', $auth->acl_get('m_move', $forum_id)), + 'make_normal' => array('MAKE_NORMAL', ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL)), + 'make_sticky' => array('MAKE_STICKY', ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY)), + 'make_announce' => array('MAKE_ANNOUNCE', ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE)), + 'make_global' => array('MAKE_GLOBAL', ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL)), + 'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)), +); + +foreach($quickmod_array as $option => $qm_ary) +{ + if (!empty($qm_ary[1])) + { + phpbb_add_quickmod_option($option, $qm_ary[0]); + } +} // If we've got a hightlight set pass it on to pagination. $pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start); @@ -626,7 +600,7 @@ $template->assign_vars(array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start), - 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts), + 'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total_posts), 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, $user->session_id) : '', 'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '', @@ -657,7 +631,6 @@ $template->assign_vars(array( 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true, 'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start")), - 'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '', 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . "&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id), 'S_VIEWTOPIC' => true, @@ -678,12 +651,16 @@ $template->assign_vars(array( 'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&view=print' : '', 'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&t=$topic_id") : '', - 'U_WATCH_TOPIC' => $s_watching_topic['link'], - 'L_WATCH_TOPIC' => $s_watching_topic['title'], + 'U_WATCH_TOPIC' => $s_watching_topic['link'], + 'U_WATCH_TOPIC_TOGGLE' => $s_watching_topic['link_toggle'], + 'S_WATCH_TOPIC_TITLE' => $s_watching_topic['title'], + 'S_WATCH_TOPIC_TOGGLE' => $s_watching_topic['title_toggle'], 'S_WATCHING_TOPIC' => $s_watching_topic['is_watching'], 'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&bookmark=1&hash=' . generate_link_hash("topic_$topic_id") : '', - 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], + 'S_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], + 'S_BOOKMARK_TOGGLE' => (!$user->data['is_registered'] || !$config['allow_bookmarks'] || !$topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], + 'S_BOOKMARKED_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? true : false, 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&f=$forum_id") : '', 'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&f=$forum_id&t=$topic_id") : '', @@ -728,9 +705,9 @@ if (!empty($topic_data['poll_start'])) // Cookie based guest tracking ... I don't like this but hum ho // it's oft requested. This relies on "nice" users who don't feel // the need to delete cookies to mess with results. - if (isset($_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id])) + if ($request->is_set($config['cookie_name'] . '_poll_' . $topic_id, phpbb_request_interface::COOKIE)) { - $cur_voted_id = explode(',', $_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]); + $cur_voted_id = explode(',', $request->variable($config['cookie_name'] . '_poll_' . $topic_id, '', true, phpbb_request_interface::COOKIE)); $cur_voted_id = array_map('intval', $cur_voted_id); } } @@ -889,7 +866,7 @@ if (!empty($topic_data['poll_start'])) 'POLL_OPTION_RESULT' => $poll_option['poll_option_total'], 'POLL_OPTION_PERCENT' => $option_pct_txt, 'POLL_OPTION_PCT' => round($option_pct * 100), - 'POLL_OPTION_IMG' => $user->img('poll_center', $option_pct_txt, round($option_pct * 250)), + 'POLL_OPTION_WIDTH' => round($option_pct * 250), 'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false) ); } @@ -902,7 +879,7 @@ if (!empty($topic_data['poll_start'])) 'POLL_LEFT_CAP_IMG' => $user->img('poll_left'), 'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'), - 'L_MAX_VOTES' => ($topic_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $topic_data['poll_max_options']), + 'L_MAX_VOTES' => $user->lang('MAX_OPTIONS_SELECT', (int) $topic_data['poll_max_options']), 'L_POLL_LENGTH' => ($topic_data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '', 'S_HAS_POLL' => true, @@ -991,7 +968,7 @@ if (!sizeof($post_list)) // We need to grab it because we do reverse ordering sometimes $max_post_time = 0; -$sql = $db->sql_build_query('SELECT', array( +$sql_ary = array( 'SELECT' => 'u.*, z.friend, z.foe, p.*', 'FROM' => array( @@ -1002,14 +979,15 @@ $sql = $db->sql_build_query('SELECT', array( 'LEFT_JOIN' => array( array( 'FROM' => array(ZEBRA_TABLE => 'z'), - 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id' - ) + 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id', + ), ), 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . ' - AND u.user_id = p.poster_id' -)); + AND u.user_id = p.poster_id', +); +$sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); @@ -1125,7 +1103,7 @@ while ($row = $db->sql_fetchrow($result)) { $user_sig = ''; - // We add the signature to every posters entry because enable_sig is post dependant + // We add the signature to every posters entry because enable_sig is post dependent if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs')) { $user_sig = $row['user_sig']; @@ -1359,7 +1337,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) continue; } - $row =& $rowset[$post_list[$i]]; + $row = $rowset[$post_list[$i]]; $poster_id = $row['user_id']; // End signature parsing, only if needed @@ -1429,8 +1407,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) unset($post_storage_list); } - $l_edit_time_total = ($row['post_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL']; - if ($row['post_edit_reason']) { // User having edited the post also being the post author? @@ -1443,7 +1419,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']); } - $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']); + $l_edited_by = $user->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $user->format_date($row['post_edit_time'], false, true)); } else { @@ -1462,7 +1438,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']); } - $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']); + $l_edited_by = $user->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $user->format_date($row['post_edit_time'], false, true)); } } else @@ -1564,10 +1540,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_YIM' => $user_cache[$poster_id]['yim'], 'U_JABBER' => $user_cache[$poster_id]['jabber'], + 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p={$row['post_id']}&f=$forum_id"), 'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '', 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', - 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&f=' . $forum_id : '') . '#p' . $row['post_id'], + 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '', 'U_PREV_POST_ID' => $prev_post_id, 'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $poster_id, true, $user->session_id) : '', @@ -1643,41 +1620,21 @@ if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($use } } -// Get last post time for all global announcements -// to keep proper forums tracking -if ($topic_data['topic_type'] == POST_GLOBAL) -{ - $sql = 'SELECT topic_last_post_time as forum_last_post_time - FROM ' . TOPICS_TABLE . ' - WHERE forum_id = 0 - ORDER BY topic_last_post_time DESC'; - $result = $db->sql_query_limit($sql, 1); - $topic_data['forum_last_post_time'] = (int) $db->sql_fetchfield('forum_last_post_time'); - $db->sql_freeresult($result); - - $sql = 'SELECT mark_time as forum_mark_time - FROM ' . FORUMS_TRACK_TABLE . ' - WHERE forum_id = 0 - AND user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $topic_data['forum_mark_time'] = (int) $db->sql_fetchfield('forum_mark_time'); - $db->sql_freeresult($result); -} - // Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed. if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id]) { - markread('topic', (($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_id, $max_post_time); + markread('topic', $forum_id, $topic_id, $max_post_time); // Update forum info - $all_marked_read = update_forum_tracking_info((($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false); + $all_marked_read = update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false); } else { $all_marked_read = true; } -// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link +// If there are absolutely no more unread posts in this forum +// and unread posts shown, we can safely show the #unread link if ($all_marked_read) { if ($post_unread) @@ -1760,19 +1717,19 @@ if ($s_can_vote || $s_quick_reply) // We overwrite $_REQUEST['f'] if there is no forum specified // to be able to display the correct online list. // One downside is that the user currently viewing this topic/post is not taken into account. -if (empty($_REQUEST['f'])) +if (!request_var('f', 0)) { - $_REQUEST['f'] = $forum_id; + $request->overwrite('f', $forum_id); } // We need to do the same with the topic_id. See #53025. -if (empty($_REQUEST['t']) && !empty($topic_id)) +if (!request_var('t', 0) && !empty($topic_id)) { - $_REQUEST['t'] = $topic_id; + $request->overwrite('t', $topic_id); } // Output the page -page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id); +page_header($topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], floor($start / $config['posts_per_page']) + 1) : ''), true, $forum_id); $template->set_filenames(array( 'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html') @@ -1780,5 +1737,3 @@ $template->set_filenames(array( make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id); page_footer(); - -?>
\ No newline at end of file |