use Friendica\Content\Widget;
use Friendica\Core\Renderer;
use Friendica\Core\Search;
-use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
*/
function match_content(App $a)
{
- if (!Session::getLocalUser()) {
+ if (!DI::userSession()->getLocalUserId()) {
return '';
}
$_SESSION['return_path'] = DI::args()->getCommand();
- $profile = Profile::getByUID(Session::getLocalUser());
+ $profile = Profile::getByUID(DI::userSession()->getLocalUserId());
if (!DBA::isResult($profile)) {
return '';
$tags = trim($profile['pub_keywords'] . ' ' . $profile['prv_keywords']);
if (DI::mode()->isMobile()) {
- $limit = DI::pConfig()->get(Session::getLocalUser(), 'system', 'itemspage_mobile_network',
+ $limit = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network',
DI::config()->get('system', 'itemspage_network_mobile'));
} else {
- $limit = DI::pConfig()->get(Session::getLocalUser(), 'system', 'itemspage_network',
+ $limit = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_network',
DI::config()->get('system', 'itemspage_network'));
}
}
// Already known contact
- $contact = Contact::getByURL($profile->url, null, ['rel'], Session::getLocalUser());
+ $contact = Contact::getByURL($profile->url, null, ['rel'], DI::userSession()->getLocalUserId());
if (!empty($contact) && in_array($contact['rel'], [Contact::FRIEND, Contact::SHARING])) {
continue;
}
- $contact = Contact::getByURLForUser($profile->url, Session::getLocalUser());
+ $contact = Contact::getByURLForUser($profile->url, DI::userSession()->getLocalUserId());
if (!empty($contact)) {
$entries[$contact['id']] = ModuleContact::getContactTemplateVars($contact);
}