Merge pull request #8188 from MrPetovan/task/remove-profile-tab-parameter

Replace profile tab GET parameter by route
This commit is contained in:
Philipp 2020-01-28 01:34:48 +01:00 committed by GitHub
commit 0b8fd92e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 10 additions and 30 deletions

View file

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

View file

@ -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.
<a name="contacts"></a>

View file

@ -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.
<a name="contacts"></a>
### Was ist der Unterschied zwischen blockierten|ignorierten|archivierten|versteckten Kontakten?

View file

@ -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)) {

View file

@ -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);

View file

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

View file

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

View file

@ -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');
}
}

View file

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