From a60765660725d5cd9082de14911cf4ea6b6a1b66 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Jan 2020 19:21:18 -0500 Subject: [PATCH] Replace profile tab GET parameter by route --- doc/Developers-Intro.md | 4 ++-- doc/FAQ.md | 10 ---------- doc/de/FAQ.md | 10 ---------- include/conversation.php | 4 ++-- mod/dfrn_poll.php | 2 +- src/Content/Nav.php | 2 +- src/Model/Contact.php | 4 ++-- src/Module/Contact.php | 2 +- view/theme/frio/theme.php | 2 +- 9 files changed, 10 insertions(+), 30 deletions(-) diff --git a/doc/Developers-Intro.md b/doc/Developers-Intro.md index f72ff4abe..3b8c93f0a 100644 --- a/doc/Developers-Intro.md +++ b/doc/Developers-Intro.md @@ -154,5 +154,5 @@ If you are interested in improving those clients, please contact the developers * Android / LinageOS: **Friendiqa** [src](https://git.friendi.ca/lubuwest/Friendiqa)/[Google Play](https://play.google.com/store/apps/details?id=org.qtproject.friendiqa) developed by [Marco R](https://freunde.ma-nic.de/profile/marco) * iOS: *currently no client* -* SailfishOS: **Friendiy** [src](https://kirgroup.com/projects/fabrixxm/harbour-friendly) - developed by [Fabio](https://kirgroup.com/profile/fabrixxm/?tab=profile) -* Windows: **Friendica Mobile** for Windows versions [before 8.1](http://windowsphone.com/s?appid=e3257730-c9cf-4935-9620-5261e3505c67) and [Windows 10](https://www.microsoft.com/store/apps/9nblggh0fhmn) - developed by [Gerhard Seeber](http://mozartweg.dyndns.org/friendica/profile/gerhard/?tab=profile) +* SailfishOS: **Friendiy** [src](https://kirgroup.com/projects/fabrixxm/harbour-friendly) - developed by [Fabio](https://kirgroup.com/profile/fabrixxm/profile) +* Windows: **Friendica Mobile** for Windows versions [before 8.1](http://windowsphone.com/s?appid=e3257730-c9cf-4935-9620-5261e3505c67) and [Windows 10](https://www.microsoft.com/store/apps/9nblggh0fhmn) - developed by [Gerhard Seeber](http://mozartweg.dyndns.org/friendica/profile/gerhard/profile) diff --git a/doc/FAQ.md b/doc/FAQ.md index 323cb1619..11954e46f 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -91,16 +91,6 @@ in German: https://social.example.com/profile/example?lang=de. -If the question mark is already in the url you need to do it using a ampersand. - -Example: - - https://social.example.com/profile/example?tab=profile - -in German: - - https://social.example.com/profile/example?tab=profile&lang=de. - When a certain language is forced, the language remains until session is closed. diff --git a/doc/de/FAQ.md b/doc/de/FAQ.md index 85a6f389a..2e71d7c93 100644 --- a/doc/de/FAQ.md +++ b/doc/de/FAQ.md @@ -106,16 +106,6 @@ auf Deutsch: https://social.example.com/profile/example?lang=de. -Wenn das Fragezeichen bereits in der URL verwendet wird, werden die einzelnen URL Parameter mit einem kaufmännischen Und getrennt werden. - -Ein Beispiel: - - https://social.example.com/profile/example?tab=profile - -auf Deutsch: - - https://social.example.com/profile/example?tab=profile&lang=de. - ### Was ist der Unterschied zwischen blockierten|ignorierten|archivierten|versteckten Kontakten? diff --git a/include/conversation.php b/include/conversation.php index 3f500717a..0194e4ea5 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -919,9 +919,9 @@ function item_photo_menu($item) { } if ($sparkle) { - $status_link = $profile_link . '?tab=status'; + $status_link = $profile_link . '/status'; $photos_link = str_replace('/profile/', '/photos/', $profile_link); - $profile_link = $profile_link . '?=profile'; + $profile_link = $profile_link . '/profile'; } if (!empty($pcid)) { diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index c444f0389..bc0100bfa 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -538,7 +538,7 @@ function dfrn_poll_content(App $a) switch ($destination_url) { case 'profile': - DI::baseUrl()->redirect('profile/' . $profile . '?tab=profile'); + DI::baseUrl()->redirect('profile/' . $profile . '/profile'); break; case 'photos': DI::baseUrl()->redirect('photos/' . $profile); diff --git a/src/Content/Nav.php b/src/Content/Nav.php index 3024fcaea..8f565cc3d 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -155,7 +155,7 @@ class Nav if (local_user()) { // user menu $nav['usermenu'][] = ['profile/' . $a->user['nickname'], DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')]; - $nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; + $nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; $nav['usermenu'][] = ['photos/' . $a->user['nickname'], DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')]; $nav['usermenu'][] = ['videos/' . $a->user['nickname'], DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')]; $nav['usermenu'][] = ['events/', DI::l10n()->t('Events'), '', DI::l10n()->t('Your events')]; diff --git a/src/Model/Contact.php b/src/Model/Contact.php index d20872ed6..201447437 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1230,9 +1230,9 @@ class Contact } if ($sparkle) { - $status_link = $profile_link . '?tab=status'; + $status_link = $profile_link . '/status'; $photos_link = str_replace('/profile/', '/photos/', $profile_link); - $profile_link = $profile_link . '?tab=profile'; + $profile_link = $profile_link . '/profile'; } if (self::canReceivePrivateMessages($contact) && empty($contact['pending'])) { diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 1cb0132a0..d087634e4 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -270,7 +270,7 @@ class Contact extends BaseModule if (($a->argc == 3) && intval($a->argv[1]) && in_array($a->argv[2], ['posts', 'conversations'])) { DI::baseUrl()->redirect('profile/' . $contact['nick']); } else { - DI::baseUrl()->redirect('profile/' . $contact['nick'] . '?tab=profile'); + DI::baseUrl()->redirect('profile/' . $contact['nick'] . '/profile'); } } diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 73ec95438..f256bec69 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -264,7 +264,7 @@ function frio_remote_nav($a, &$nav) if (!local_user() && !empty($server_url) && !is_null($remoteUser)) { // user menu $nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'], DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')]; - $nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '?tab=profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; + $nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; $nav['usermenu'][] = [$server_url . '/photos/' . $remoteUser['nick'], DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')]; $nav['usermenu'][] = [$server_url . '/videos/' . $remoteUser['nick'], DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')]; $nav['usermenu'][] = [$server_url . '/events/', DI::l10n()->t('Events'), '', DI::l10n()->t('Your events')];