diff options
author | Chris Smith <toonarmy@phpbb.com> | 2010-03-18 17:22:30 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2010-03-18 17:22:30 +0000 |
commit | a3a8fb989cd01d9b4156041870069ebcb7e057dd (patch) | |
tree | b9f2a696d25d3c88314121adaea65f32dbb38326 /phpBB/viewforum.php | |
parent | 5193160546625b6378deda8c0028a861f0760292 (diff) | |
download | forums-a3a8fb989cd01d9b4156041870069ebcb7e057dd.tar forums-a3a8fb989cd01d9b4156041870069ebcb7e057dd.tar.gz forums-a3a8fb989cd01d9b4156041870069ebcb7e057dd.tar.bz2 forums-a3a8fb989cd01d9b4156041870069ebcb7e057dd.tar.xz forums-a3a8fb989cd01d9b4156041870069ebcb7e057dd.zip |
[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-.
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 95c142d865..72b5074351 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -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") : '', )); |