mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[bug/59465] Removes start=0 from URLs used by viewtopic and viewforum.
Having start=0 makes search engines index the page twice once with and once without the start=0 parameter. This results in duplicate results in the search results. Patch contributed by nn-.
This commit is contained in:
@@ -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") : '',
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user