From 3f56bbb9d173867a6f947615f735e3b66f8d2886 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 8 Dec 2021 17:34:07 +0100 Subject: [PATCH] [ticket/16930] Remove redundant topic ID from last post URL Since U_LAST_POST contains the post ID, the topic ID is not required. This shortens the URL and helps with SEO by reducing the amount of redundant parameters in internal links. PHPBB3-16930 Signed-off-by: MichaIng --- phpBB/viewforum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 8606d3ef59..f070e0400f 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -999,7 +999,7 @@ if (count($topic_list)) 'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false, 'U_NEWEST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&view=unread') . '#unread' : false, - 'U_LAST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'] : false, + 'U_LAST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'] : false, 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_VIEW_TOPIC' => $view_topic_url,