]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Nav.php
Restructure Cache to follow new paradigm
[friendica.git] / src / Content / Nav.php
index 2263b1cae38df59f7dbccddd32d0b84cb730bf85..db3eddfe2312c9ef11868152a329e97aeb48fcf2 100644 (file)
@@ -23,7 +23,6 @@ namespace Friendica\Content;
 
 use Friendica\App;
 use Friendica\Core\Hook;
-use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
@@ -155,7 +154,7 @@ class Nav
                 * Display the current site location as a navigation aid.
                 */
 
-               $myident = !empty($a->getNickname() ? $a->getNickname() . '@' : '');
+               $myident = !empty($a->getLoggedInUserNickname()) ? $a->getLoggedInUserNickname() . '@' : '';
 
                $sitelocation = $myident . substr(DI::baseUrl()->get($ssl_state), strpos(DI::baseUrl()->get($ssl_state), '//') + 2);
 
@@ -188,15 +187,15 @@ class Nav
 
                if ($a->isLoggedIn()) {
                        // user menu
-                       $nav['usermenu'][] = ['profile/' . $a->getNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
-                       $nav['usermenu'][] = ['profile/' . $a->getNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
-                       $nav['usermenu'][] = ['photos/' . $a->getNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
-                       $nav['usermenu'][] = ['videos/' . $a->getNickname(), DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')];
+                       $nav['usermenu'][] = ['profile/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
+                       $nav['usermenu'][] = ['profile/' . $a->getLoggedInUserNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
+                       $nav['usermenu'][] = ['photos/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
+                       $nav['usermenu'][] = ['media/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Media'), '', DI::l10n()->t('Your postings with media')];
                        $nav['usermenu'][] = ['events/', DI::l10n()->t('Events'), '', DI::l10n()->t('Your events')];
                        $nav['usermenu'][] = ['notes/', DI::l10n()->t('Personal notes'), '', DI::l10n()->t('Your personal notes')];
 
                        // user info
-                       $contact = DBA::selectFirst('contact', ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl', 'updated'], ['uid' => $a->getUserId(), 'self' => true]);
+                       $contact = DBA::selectFirst('contact', ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl', 'updated'], ['uid' => $a->getLoggedInUserId(), 'self' => true]);
                        $userinfo = [
                                'icon' => Contact::getMicro($contact),
                                'name' => $contact['name'],
@@ -268,10 +267,10 @@ class Nav
                }
 
                // The following nav links are only show to logged in users
-               if (local_user() && !empty($a->getNickname())) {
+               if (local_user() && !empty($a->getLoggedInUserNickname())) {
                        $nav['network'] = ['network', DI::l10n()->t('Network'), '', DI::l10n()->t('Conversations from your friends')];
 
-                       $nav['home'] = ['profile/' . $a->getNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
+                       $nav['home'] = ['profile/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
 
                        // Don't show notifications for public communities
                        if (Session::get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {