mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
Replace defaults() calls on $_SESSION by Core\Session calls
- Replace direct calls to $_SESSION by Core\Session calls in Module\Login
This commit is contained in:
parent
cbca26d185
commit
01e71254d9
10 changed files with 37 additions and 43 deletions
|
@ -9,6 +9,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -172,7 +173,7 @@ class Nav
|
|||
// "Home" should also take you home from an authenticated remote profile connection
|
||||
$homelink = Profile::getMyURL();
|
||||
if (! $homelink) {
|
||||
$homelink = defaults($_SESSION, 'visitor_home', '');
|
||||
$homelink = Session::get('visitor_home', '');
|
||||
}
|
||||
|
||||
if (($a->module != 'home') && (! (local_user()))) {
|
||||
|
@ -241,7 +242,7 @@ class Nav
|
|||
$nav['home'] = ['profile/' . $a->user['nickname'], L10n::t('Home'), '', L10n::t('Your posts and conversations')];
|
||||
|
||||
// Don't show notifications for public communities
|
||||
if (defaults($_SESSION, 'page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {
|
||||
if (Session::get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {
|
||||
$nav['introductions'] = ['notifications/intros', L10n::t('Introductions'), '', L10n::t('Friend Requests')];
|
||||
$nav['notifications'] = ['notifications', L10n::t('Notifications'), '', L10n::t('Notifications')];
|
||||
$nav['notifications']['all'] = ['notifications/system', L10n::t('See all notifications'), '', ''];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue