mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:10:10 +00: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
|
@ -307,7 +307,7 @@ class Network extends BaseModule
|
|||
|
||||
self::$forumContactId = $this->parameters['contact_id'] ?? 0;
|
||||
|
||||
self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
|
||||
self::$selectedTab = DI::session()->get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
|
||||
|
||||
if (!empty($get['star'])) {
|
||||
self::$selectedTab = 'star';
|
||||
|
|
|
@ -46,8 +46,8 @@ class Delegation extends BaseModule
|
|||
$uid = local_user();
|
||||
$orig_record = User::getById(DI::app()->getLoggedInUserId());
|
||||
|
||||
if (Session::get('submanage')) {
|
||||
$user = User::getById(Session::get('submanage'));
|
||||
if (DI::session()->get('submanage')) {
|
||||
$user = User::getById(DI::session()->get('submanage'));
|
||||
if (DBA::isResult($user)) {
|
||||
$uid = intval($user['uid']);
|
||||
$orig_record = $user;
|
||||
|
|
|
@ -139,7 +139,7 @@ class Status extends BaseProfile
|
|||
// Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups
|
||||
$condition = Item::getPermissionsConditionArrayByUserId($profile['uid']);
|
||||
|
||||
$last_updated_array = Session::get('last_updated', []);
|
||||
$last_updated_array = DI::session()->get('last_updated', []);
|
||||
|
||||
if (!empty($category)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `category-view` WHERE `name` = ? AND `type` = ? AND `uid` = ?)",
|
||||
|
|
|
@ -77,7 +77,7 @@ class Delegation extends BaseSettings
|
|||
$user_id = $args->get(3);
|
||||
|
||||
if ($action === 'add' && $user_id) {
|
||||
if (Session::get('submanage')) {
|
||||
if (DI::session()->get('submanage')) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
|
||||
DI::baseUrl()->redirect('settings/delegation');
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ class Delegation extends BaseSettings
|
|||
}
|
||||
|
||||
if ($action === 'remove' && $user_id) {
|
||||
if (Session::get('submanage')) {
|
||||
if (DI::session()->get('submanage')) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.'));
|
||||
DI::baseUrl()->redirect('settings/delegation');
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ class Display extends BaseSettings
|
|||
}
|
||||
|
||||
$theme_selected = $user['theme'] ?: $default_theme;
|
||||
$mobile_theme_selected = Session::get('mobile-theme', $default_mobile_theme);
|
||||
$mobile_theme_selected = DI::session()->get('mobile-theme', $default_mobile_theme);
|
||||
|
||||
$itemspage_network = intval(DI::pConfig()->get(local_user(), 'system', 'itemspage_network'));
|
||||
$itemspage_network = (($itemspage_network > 0 && $itemspage_network < 101) ? $itemspage_network : DI::config()->get('system', 'itemspage_network'));
|
||||
|
|
|
@ -106,7 +106,7 @@ class Verify extends BaseSettings
|
|||
parent::content();
|
||||
|
||||
$company = 'Friendica';
|
||||
$holder = Session::get('my_address');
|
||||
$holder = DI::session()->get('my_address');
|
||||
$secret = $this->pConfig->get(local_user(), '2fa', 'secret');
|
||||
|
||||
$otpauthUrl = (new Google2FA())->getQRCodeUrl($company, $holder, $secret);
|
||||
|
|
|
@ -66,7 +66,7 @@ class Profile extends BaseModule
|
|||
// Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups
|
||||
$sql_extra = Item::getPermissionsSQLByUserId($a->getProfileOwner());
|
||||
|
||||
$last_updated_array = Session::get('last_updated', []);
|
||||
$last_updated_array = DI::session()->get('last_updated', []);
|
||||
|
||||
$last_updated = $last_updated_array[$last_updated_key] ?? 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue