aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html4
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html4
-rw-r--r--phpBB/viewforum.php1
-rw-r--r--phpBB/viewtopic.php1
5 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 137cb0e7fa..2001c816eb 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -677,6 +677,8 @@ switch ($mode)
'U_ADD_FOE' => (!$friend && !$foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
'U_REMOVE_FRIEND' => ($friend && $friends_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '',
'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
+
+ 'U_CANONICAL' => generate_board_url() . '/' . append_sid("memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id, true, ''),
));
if (!empty($profile_fields['row']))
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 353ba9139a..8c63ce9cea 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -18,6 +18,10 @@
<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&amp;t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->
+<!-- IF U_CANONICAL -->
+ <link rel="canonical" href="{U_CANONICAL}" />
+<!-- ENDIF -->
+
<!--
phpBB style name: prosilver
Based on style: prosilver (this is the default phpBB3 style)
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 0d3e727ecd..b4a2fa5b59 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -17,6 +17,10 @@
<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&amp;t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->
+<!-- IF U_CANONICAL -->
+ <link rel="canonical" href="{U_CANONICAL}" />
+<!-- ENDIF -->
+
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
<link rel="stylesheet" href="{T_STYLESHEET_LANG_LINK}" type="text/css" />
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index f1b0b4df5b..6c7e56cffd 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -366,6 +366,7 @@ $template->assign_vars(array(
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;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&amp;f=' . $forum_id) : '',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($start == 0) ? '' : "&amp;start=$start")),
+ 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($start) ? "&amp;start=$start" : ''), true, ''),
'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&amp;f=$forum_id&amp;mark=topics&amp;mark_time=" . time()) : '',
));
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 95bee9789f..4553917d80 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -642,6 +642,7 @@ $template->assign_vars(array(
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&amp;t=$topic_id",
'U_FORUM' => $server_path,
'U_VIEW_TOPIC' => $viewtopic_url,
+ 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewtopic.$phpEx", "t=$topic_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($start) ? "&amp;start=$start" : ''), true, ''),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=previous"),
'U_VIEW_NEWER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=next"),