X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FNav.php;h=31911688d69ab3b77624ab7b84997424a1c37df0;hb=af6dbc654f82225cfc647fe2072662acae388e47;hp=c437c6e2a1859cbcce1bf5a4323a89bbc60d95c0;hpb=c66c09d5fd86e74ac6f1b877143e8cf55e3a0340;p=friendica.git diff --git a/src/Content/Nav.php b/src/Content/Nav.php index c437c6e2a1..31911688d6 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -10,9 +10,9 @@ use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\System; +use Friendica\Database\DBA; use Friendica\Database\DBM; use Friendica\Model\Profile; -use dba; require_once 'boot.php'; require_once 'dba.php'; @@ -105,7 +105,7 @@ class Nav $nav['usermenu'][] = ['notes/', L10n::t('Personal notes'), '', L10n::t('Your personal notes')]; // user info - $contact = dba::selectFirst('contact', ['micro'], ['uid' => $a->user['uid'], 'self' => true]); + $contact = DBA::selectFirst('contact', ['micro'], ['uid' => $a->user['uid'], 'self' => true]); $userinfo = [ 'icon' => (DBM::is_result($contact) ? $a->remove_baseurl($contact['micro']) : 'images/person-48.jpg'), 'name' => $a->user['username'], @@ -124,7 +124,7 @@ class Nav $nav['home'] = [$homelink, L10n::t('Home'), '', L10n::t('Home Page')]; } - if (($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) { + if (intval(Config::get('config', 'register_policy')) === REGISTER_OPEN && !local_user() && !remote_user()) { $nav['register'] = ['register', L10n::t('Register'), '', L10n::t('Create an account')]; } @@ -161,7 +161,8 @@ class Nav } } - if (local_user() || Config::get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) { + if ((local_user() || Config::get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) && + !(Config::get('system', 'community_page_style') == CP_NO_INTERNAL_COMMUNITY)) { $nav['community'] = ['community', L10n::t('Community'), '', L10n::t('Conversations on this and other servers')]; } @@ -173,6 +174,10 @@ class Nav $nav['about'] = ['friendica', L10n::t('Information'), '', L10n::t('Information about this friendica instance')]; + if (Config::get('system', 'tosdisplay')) { + $nav['tos'] = ['tos', L10n::t('Terms of Service'), '', L10n::t('Terms of Service of this Friendica instance')]; + } + // The following nav links are only show to logged in users if (local_user()) { $nav['network'] = ['network', L10n::t('Network'), '', L10n::t('Conversations from your friends')];