Replace profile tab GET parameter by route
This commit is contained in:
parent
74a25eb670
commit
a607656607
9 changed files with 10 additions and 30 deletions
|
|
@ -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')];
|
||||
|
|
|
|||
|
|
@ -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'])) {
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue