mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:10:13 +00:00
Remove direct calls to App->user
This commit is contained in:
parent
266ee26240
commit
fc283ab928
51 changed files with 238 additions and 166 deletions
|
@ -130,10 +130,10 @@ class Community extends BaseModule
|
|||
if (Session::isAuthenticated()) {
|
||||
$x = [
|
||||
'is_owner' => true,
|
||||
'allow_location' => DI::app()->user['allow_location'],
|
||||
'default_location' => DI::app()->user['default-location'],
|
||||
'nickname' => DI::app()->user['nickname'],
|
||||
'lockstate' => (is_array(DI::app()->user) && (strlen(DI::app()->user['allow_cid']) || strlen(DI::app()->user['allow_gid']) || strlen(DI::app()->user['deny_cid']) || strlen(DI::app()->user['deny_gid'])) ? 'lock' : 'unlock'),
|
||||
'allow_location' => DI::app()->getUserValue('allow_location'),
|
||||
'default_location' => DI::app()->getUserValue('default-location'),
|
||||
'nickname' => DI::app()->getNickname(),
|
||||
'lockstate' => ACL::getLockstateForUserId(DI::app()->getUserId()) ? 'lock' : 'unlock',
|
||||
'acl' => ACL::getFullSelectorHTML(DI::page(), DI::app()->user, true),
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
|
|
|
@ -140,12 +140,10 @@ class Network extends BaseModule
|
|||
|
||||
$x = [
|
||||
'is_owner' => true,
|
||||
'allow_location' => $a->user['allow_location'],
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => (self::$groupId || self::$forumContactId || self::$network || (is_array($a->user) &&
|
||||
(strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) ||
|
||||
strlen($a->user['deny_cid']) || strlen($a->user['deny_gid']))) ? 'lock' : 'unlock'),
|
||||
'allow_location' => $a->getUserValue('allow_location'),
|
||||
'default_location' => $a->getUserValue('default-location'),
|
||||
'nickname' => $a->getNickname(),
|
||||
'lockstate' => self::$groupId || self::$forumContactId || self::$network || ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
|
||||
'default_perms' => ACL::getDefaultUserPermissions($a->user),
|
||||
'acl' => ACL::getFullSelectorHTML(DI::page(), $a->user, true, $default_permissions),
|
||||
'bang' => ((self::$groupId || self::$forumContactId || self::$network) ? '!' : ''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue