mirror of
https://github.com/friendica/friendica
synced 2025-04-20 15:50:12 +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
|
@ -62,7 +62,7 @@ class Common extends BaseProfile
|
|||
$a->redirect('profile/' . $nickname . '/contacts');
|
||||
};
|
||||
|
||||
$o = self::getTabsHTML($a, 'contacts', false, $profile);
|
||||
$o = self::getTabsHTML($a, 'contacts', false, $profile['nickname'], $profile['hide-friends']);
|
||||
|
||||
$tabs = self::getContactFilterTabs('profile/' . $nickname, 'common', $displayCommonTab);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class Contacts extends Module\BaseProfile
|
|||
|
||||
Nav::setSelected('home');
|
||||
|
||||
$o = self::getTabsHTML($a, 'contacts', $is_owner, $profile);
|
||||
$o = self::getTabsHTML($a, 'contacts', $is_owner, $profile['nickname'], $profile['hide-friends']);
|
||||
|
||||
$tabs = self::getContactFilterTabs('profile/' . $nickname, $type, Session::isAuthenticated() && $profile['uid'] != local_user());
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class Profile extends BaseProfile
|
|||
Nav::setSelected('home');
|
||||
|
||||
$is_owner = local_user() == $profile['uid'];
|
||||
$o = self::getTabsHTML($a, 'profile', $is_owner, $profile);
|
||||
$o = self::getTabsHTML($a, 'profile', $is_owner, $profile['nickname'], $profile['hide-friends']);
|
||||
|
||||
if (!empty($profile['hidewall']) && !$is_owner && !$remote_contact_id) {
|
||||
notice(DI::l10n()->t('Access to this profile has been restricted.'));
|
||||
|
|
|
@ -58,7 +58,7 @@ class Schedule extends BaseProfile
|
|||
|
||||
$a = DI::app();
|
||||
|
||||
$o = self::getTabsHTML($a, 'schedule', true, $a->user);
|
||||
$o = self::getTabsHTML($a, 'schedule', true, $a->getNickname(), false);
|
||||
|
||||
$schedule = [];
|
||||
$delayed = DBA::select('delayed-post', [], ['uid' => local_user()]);
|
||||
|
|
|
@ -110,7 +110,7 @@ class Status extends BaseProfile
|
|||
return '';
|
||||
}
|
||||
|
||||
$o .= self::getTabsHTML($a, 'status', $is_owner, $profile);
|
||||
$o .= self::getTabsHTML($a, 'status', $is_owner, $profile['nickname'], $profile['hide-friends']);
|
||||
|
||||
$o .= Widget::commonFriendsVisitor($profile['uid'], $profile['nickname']);
|
||||
|
||||
|
@ -125,14 +125,9 @@ class Status extends BaseProfile
|
|||
$x = [
|
||||
'is_owner' => $is_owner,
|
||||
'allow_location' => ($is_owner || $commvisitor) && $profile['allow_location'],
|
||||
'default_location' => $is_owner ? $a->user['default-location'] : '',
|
||||
'default_location' => $is_owner ? $a->getUserValue('default-location') : '',
|
||||
'nickname' => $profile['nickname'],
|
||||
'lockstate' => 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',
|
||||
'lockstate' => ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
|
||||
'acl' => $is_owner ? ACL::getFullSelectorHTML(DI::page(), $a->user, true) : '',
|
||||
'bang' => '',
|
||||
'visitor' => $is_owner || $commvisitor ? 'block' : 'none',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue