aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-04-04 15:33:48 +0200
committerNils Adermann <naderman@naderman.de>2010-04-04 15:33:48 +0200
commitf8ff68f21d16d583da5c58cef4e961cc226926dd (patch)
tree83e3ca4cfba25fe89db2da4d5d031f7eb192dcd8 /phpBB/viewtopic.php
parent382354925d59e3da12781f8877ab0a70d0c434d9 (diff)
parent925a135613a80ba9bfc3b26a2524d3c2d3ba77b3 (diff)
downloadforums-f8ff68f21d16d583da5c58cef4e961cc226926dd.tar
forums-f8ff68f21d16d583da5c58cef4e961cc226926dd.tar.gz
forums-f8ff68f21d16d583da5c58cef4e961cc226926dd.tar.bz2
forums-f8ff68f21d16d583da5c58cef4e961cc226926dd.tar.xz
forums-f8ff68f21d16d583da5c58cef4e961cc226926dd.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [bug/9047] Use correct forum_id to generate the active topics list. (Bug #9047) [bug/9512] Fix dead link in MCP on reports for global announcements in prosilver. (Bug #9512) [feature/unapproved-posts-in-feed] Little changelog correction [feature/unapproved-posts-in-feed] Increase performance of is_moderator_approve_forum() as per bantu [feature/unapproved-posts-in-feed] View note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed [bug/58745] Correct changelog message [bug/58745] Correctly close user-delete-form in ACP User Overview (Bug #58745) [bug/58695] Use method to get forums where user is moderator, thanks to bantu for the hint [bug/58695] Only show unapproved posts in ATOM Feeds for moderators (Bug #58695) [bug/59465] Remove start=0 from topic pagination links. [bug/59465] Removes start=0 from URLs used by viewtopic and viewforum.
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 29c4e5cdc1..8e0521522d 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -477,7 +477,7 @@ if ($start < 0 || $start >= $total_posts)
}
// General Viewtopic URL for return links
-$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : ''));
+$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : ''));
// Are we watching this topic?
$s_watching_topic = array(
@@ -601,7 +601,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),
- 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=topic_view&amp;f=$forum_id&amp;t=$topic_id&amp;start=$start" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''), true, $user->session_id) : '',
+ 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=topic_view&amp;f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''), true, $user->session_id) : '',
'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
@@ -630,9 +630,9 @@ $template->assign_vars(array(
'S_SELECT_SORT_KEY' => $s_sort_key,
'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&amp;t=$topic_id&amp;start=$start"),
+ 'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;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&amp;t=$topic_id&amp;start=$start&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
+ 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . "&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
'S_VIEWTOPIC' => true,
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
@@ -722,7 +722,7 @@ if (!empty($topic_data['poll_start']))
if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id) || !check_form_key('posting'))
{
- $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start");
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start"));
meta_refresh(5, $redirect_url);
if (!sizeof($voted_id))
@@ -805,7 +805,7 @@ if (!empty($topic_data['poll_start']))
//, topic_last_post_time = ' . time() . " -- for bumping topics with new votes, ignore for now
$db->sql_query($sql);
- $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start");
+ $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start"));
meta_refresh(5, $redirect_url);
trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'));