X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FNav.php;h=690af1935371d1cee8c0e60a4201a03d72ac6082;hb=ea90554e7f3e2feb50951d1bdc5a6be5c8d3635d;hp=b72f4dc043217e5961e82b2edc9ff0a9995b9aa3;hpb=d1c1c772fd936e3f766d9d1b98dc9e0cf8734d06;p=friendica.git diff --git a/src/Content/Nav.php b/src/Content/Nav.php index b72f4dc043..690af19353 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -67,7 +67,6 @@ class Nav $tpl = Renderer::getMarkupTemplate('nav.tpl'); $nav .= Renderer::replaceMacros($tpl, [ - '$baseurl' => System::baseUrl(), '$sitelocation' => $nav_info['sitelocation'], '$nav' => $nav_info['nav'], '$banner' => $nav_info['banner'], @@ -149,9 +148,13 @@ class Nav $nav['usermenu'] = []; $userinfo = null; - if (local_user()) { + if (local_user() || remote_user()) { $nav['logout'] = ['logout', L10n::t('Logout'), '', L10n::t('End this session')]; + } else { + $nav['login'] = ['login', L10n::t('Login'), ($a->module == 'login' ? 'selected' : ''), L10n::t('Sign in')]; + } + if (local_user()) { // user menu $nav['usermenu'][] = ['profile/' . $a->user['nickname'], L10n::t('Status'), '', L10n::t('Your posts and conversations')]; $nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', L10n::t('Profile'), '', L10n::t('Your profile page')]; @@ -166,8 +169,6 @@ class Nav 'icon' => (DBA::isResult($contact) ? $a->removeBaseURL($contact['micro']) : 'images/person-48.jpg'), 'name' => $a->user['username'], ]; - } else { - $nav['login'] = ['login', L10n::t('Login'), ($a->module == 'login' ? 'selected' : ''), L10n::t('Sign in')]; } // "Home" should also take you home from an authenticated remote profile connection @@ -180,7 +181,7 @@ class Nav $nav['home'] = [$homelink, L10n::t('Home'), '', L10n::t('Home Page')]; } - if (intval(Config::get('config', 'register_policy')) === REGISTER_OPEN && !local_user() && !remote_user()) { + if (intval(Config::get('config', 'register_policy')) === \Friendica\Module\Register::OPEN && !local_user() && !remote_user()) { $nav['register'] = ['register', L10n::t('Register'), '', L10n::t('Create an account')]; }