1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-02 22:02:07 +02:00

[ticket/12555] Add canonical URl for memberlist mode=viewprofile

Avoids duplicate content of:
* memberlist.php?mode=viewprofile&u=user_id
* memberlist.php?mode=viewprofile&un=username

PHPBB3-12555
This commit is contained in:
Joas Schilling 2014-05-16 11:32:33 +02:00
parent 613f4f7525
commit 199854af1b

View File

@ -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']))