mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:50: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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue