<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Content\Text\HTML;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
-use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
*
* @param int $uid of the profile owner
* @param boolean $lastitem Sort by lastitem
- * @param boolean $showhidden Show frorums which are not hidden
+ * @param boolean $showhidden Show forums which are not hidden
* @param boolean $showprivate Show private groups
*
* @return array
$condition = [
'contact-type' => Contact::TYPE_COMMUNITY,
'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB],
- 'uid' => $uid,
+ 'uid' => $uid,
'blocked' => false,
'pending' => false,
- 'archive' => false,
+ 'archive' => false,
];
$condition = DBA::mergeConditions($condition, ["`platform` != ?", 'peertube']);
/**
* Forumlist widget
*
- * Sidebar widget to show subcribed friendica forums. If activated
+ * Sidebar widget to show subscribed friendica forums. If activated
* in the settings, it appears at the notwork page sidebar
*
* @param string $baseurl Base module path
AND NOT `contact`.`pending` AND NOT `contact`.`archive`
AND `contact`.`uid` = ?
GROUP BY `contact`.`id`",
- Session::getLocalUser(), Protocol::DFRN, Protocol::ACTIVITYPUB, Contact::TYPE_COMMUNITY, Session::getLocalUser()
+ DI::userSession()->getLocalUserId(), Protocol::DFRN, Protocol::ACTIVITYPUB, Contact::TYPE_COMMUNITY, DI::userSession()->getLocalUserId()
);
return DBA::toArray($stmtContacts);