mirror of
https://github.com/friendica/friendica
synced 2025-04-30 01:04:28 +02:00
Move Core\Session::get() to DI::session()->get()
This commit is contained in:
parent
99d5441007
commit
7ac86e49d1
15 changed files with 36 additions and 31 deletions
|
@ -32,7 +32,6 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -77,8 +76,10 @@ class Conversation
|
|||
private $page;
|
||||
/** @var App\Mode */
|
||||
private $mode;
|
||||
/** @var Session\Capability\IHandleSessions */
|
||||
private $session;
|
||||
|
||||
public function __construct(LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, App\Mode $mode, App $app)
|
||||
public function __construct(LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, App\Mode $mode, App $app, Session\Capability\IHandleSessions $session)
|
||||
{
|
||||
$this->activity = $activity;
|
||||
$this->item = $item;
|
||||
|
@ -92,6 +93,7 @@ class Conversation
|
|||
$this->pConfig = $pConfig;
|
||||
$this->page = $page;
|
||||
$this->app = $app;
|
||||
$this->session = $session;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -497,7 +499,7 @@ class Conversation
|
|||
|
||||
if (!$update) {
|
||||
$live_update_div = '<div id="live-display"></div>' . "\r\n"
|
||||
. "<script> var profile_uid = " . Session::get('uid', 0) . ";"
|
||||
. "<script> var profile_uid = " . $this->session->get('uid', 0) . ";"
|
||||
. "</script>";
|
||||
}
|
||||
} elseif ($mode === 'community') {
|
||||
|
|
|
@ -208,7 +208,7 @@ class Nav
|
|||
// "Home" should also take you home from an authenticated remote profile connection
|
||||
$homelink = Profile::getMyURL();
|
||||
if (! $homelink) {
|
||||
$homelink = Session::get('visitor_home', '');
|
||||
$homelink = DI::session()->get('visitor_home', '');
|
||||
}
|
||||
|
||||
if ((DI::args()->getModuleName() != 'home') && (! (local_user()))) {
|
||||
|
@ -276,7 +276,7 @@ class Nav
|
|||
$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) {
|
||||
if (DI::session()->get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {
|
||||
$nav['introductions'] = ['notifications/intros', DI::l10n()->t('Introductions'), '', DI::l10n()->t('Friend Requests')];
|
||||
$nav['notifications'] = ['notifications', DI::l10n()->t('Notifications'), '', DI::l10n()->t('Notifications')];
|
||||
$nav['notifications']['all'] = ['notifications/system', DI::l10n()->t('See all notifications'), '', ''];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue