mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge branch 'bug/cs278/59465' into develop-olympus
* bug/cs278/59465: [bug/59465] Remove start=0 from topic pagination links. [bug/59465] Removes start=0 from URLs used by viewtopic and viewforum.
This commit is contained in:
commit
925a135613
3 changed files with 10 additions and 10 deletions
|
@ -660,7 +660,7 @@ function topic_generate_pagination($replies, $url)
|
|||
$times = 1;
|
||||
for ($j = 0; $j < $replies + 1; $j += $per_page)
|
||||
{
|
||||
$pagination .= '<a href="' . $url . '&start=' . $j . '">' . $times . '</a>';
|
||||
$pagination .= '<a href="' . $url . ($j == 0 ? '' : '&start=' . $j) . '">' . $times . '</a>';
|
||||
if ($times == 1 && $total_pages > 5)
|
||||
{
|
||||
$pagination .= ' ... ';
|
||||
|
|
|
@ -151,7 +151,7 @@ $template->set_filenames(array(
|
|||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&start=$start"),
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . (($start == 0) ? '' : "&start=$start")),
|
||||
));
|
||||
|
||||
// Not postable forum or showing active topics?
|
||||
|
@ -302,7 +302,7 @@ $template->assign_vars(array(
|
|||
'S_WATCH_FORUM_LINK' => $s_watching_forum['link'],
|
||||
'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],
|
||||
'S_WATCHING_FORUM' => $s_watching_forum['is_watching'],
|
||||
'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&start=$start"),
|
||||
'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . (($start == 0) ? '' : "&start=$start")),
|
||||
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
|
||||
'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 'fid[]=' . $forum_id),
|
||||
'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true,
|
||||
|
@ -311,7 +311,7 @@ $template->assign_vars(array(
|
|||
|
||||
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '',
|
||||
'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_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . "&start=$start"),
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start == 0) ? '' : "&start=$start")),
|
||||
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics") : '',
|
||||
));
|
||||
|
||||
|
|
|
@ -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&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : ''));
|
||||
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&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&mode=topic_view&f=$forum_id&t=$topic_id&start=$start" . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, $user->session_id) : '',
|
||||
'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]) : '',
|
||||
|
||||
'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&t=$topic_id&start=$start"),
|
||||
'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=$start&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id),
|
||||
'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,
|
||||
'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&t=$topic_id&start=$start");
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&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&t=$topic_id&start=$start");
|
||||
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&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>'));
|
||||
|
|
Loading…
Add table
Reference in a new issue