Merge pull request #6526 from Ixiter/develop-theme-frio
frio - fixed bug in user menu for remote user - see issue #6495
This commit is contained in:
commit
16b8d29d3e
1 changed files with 5 additions and 4 deletions
|
@ -237,6 +237,7 @@ function frio_remote_nav($a, &$nav)
|
||||||
} elseif (!local_user() && remote_user()) {
|
} elseif (!local_user() && remote_user()) {
|
||||||
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
|
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
|
||||||
$nav['remote'] = L10n::t('Guest');
|
$nav['remote'] = L10n::t('Guest');
|
||||||
|
$remoteUser = $r[0];
|
||||||
} elseif (Model\Profile::getMyURL()) {
|
} elseif (Model\Profile::getMyURL()) {
|
||||||
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
|
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
|
||||||
WHERE `addr` = '%s' AND `network` = 'dfrn'",
|
WHERE `addr` = '%s' AND `network` = 'dfrn'",
|
||||||
|
@ -257,10 +258,10 @@ function frio_remote_nav($a, &$nav)
|
||||||
$nav['logout'] = [$server_url . '/logout', L10n::t('Logout'), '', L10n::t('End this session')];
|
$nav['logout'] = [$server_url . '/logout', L10n::t('Logout'), '', L10n::t('End this session')];
|
||||||
|
|
||||||
// user menu
|
// user menu
|
||||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'], L10n::t('Status'), '', L10n::t('Your posts and conversations')];
|
$nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'], L10n::t('Status'), '', L10n::t('Your posts and conversations')];
|
||||||
$nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')];
|
$nav['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')];
|
||||||
$nav['usermenu'][] = [$server_url . '/photos/' . $a->user['nickname'], L10n::t('Photos'), '', L10n::t('Your photos')];
|
$nav['usermenu'][] = [$server_url . '/photos/' . $remoteUser['nick'], L10n::t('Photos'), '', L10n::t('Your photos')];
|
||||||
$nav['usermenu'][] = [$server_url . '/videos/' . $a->user['nickname'], L10n::t('Videos'), '', L10n::t('Your videos')];
|
$nav['usermenu'][] = [$server_url . '/videos/' . $remoteUser['nick'], L10n::t('Videos'), '', L10n::t('Your videos')];
|
||||||
$nav['usermenu'][] = [$server_url . '/events/', L10n::t('Events'), '', L10n::t('Your events')];
|
$nav['usermenu'][] = [$server_url . '/events/', L10n::t('Events'), '', L10n::t('Your events')];
|
||||||
|
|
||||||
// navbar links
|
// navbar links
|
||||||
|
|
Loading…
Reference in a new issue