]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Profile/Contacts.php
Merge branch 'develop' into new_image_presentation
[friendica.git] / src / Module / Profile / Contacts.php
index 544e1a24099d056323170273bb12aa6d4e14454c..5f8363a03df39f4f90d9c0488111bd4b4cd608b1 100644 (file)
@@ -25,7 +25,6 @@ use Friendica\Content\Nav;
 use Friendica\Content\Pager;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
-use Friendica\Core\Session;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model;
@@ -36,7 +35,7 @@ class Contacts extends Module\BaseProfile
 {
        protected function content(array $request = []): string
        {
-               if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
+               if (DI::config()->get('system', 'block_public') && !DI::userSession()->isAuthenticated()) {
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
                }
 
@@ -50,7 +49,7 @@ class Contacts extends Module\BaseProfile
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
                }
 
-               $is_owner = $profile['uid'] == local_user();
+               $is_owner = $profile['uid'] == DI::userSession()->getLocalUserId();
 
                if ($profile['hide-friends'] && !$is_owner) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
@@ -58,9 +57,9 @@ class Contacts extends Module\BaseProfile
 
                Nav::setSelected('home');
 
-               $o = self::getTabsHTML($a, 'contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
+               $o = self::getTabsHTML('contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
 
-               $tabs = self::getContactFilterTabs('profile/' . $nickname, $type, Session::isAuthenticated() && $profile['uid'] != local_user());
+               $tabs = self::getContactFilterTabs('profile/' . $nickname, $type, DI::userSession()->isAuthenticated() && $profile['uid'] != DI::userSession()->getLocalUserId());
 
                $condition = [
                        'uid'     => $profile['uid'],