mirror of
https://github.com/friendica/friendica
synced 2025-04-23 21:50:10 +00:00
Remove duplicate profile_uid key in App->profile array
This commit is contained in:
parent
f6f4cbab9d
commit
62fec2f190
3 changed files with 31 additions and 30 deletions
|
@ -20,7 +20,7 @@ class Profile extends BaseModule
|
|||
{
|
||||
$a = DI::app();
|
||||
|
||||
if (DI::config()->get('system', 'block_public') && !local_user() && !Session::getRemoteContactID($a->profile['profile_uid'])) {
|
||||
if (DI::config()->get('system', 'block_public') && !local_user() && !Session::getRemoteContactID($a->profile['uid'])) {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
|
@ -29,18 +29,18 @@ class Profile extends BaseModule
|
|||
$profile_uid = intval($_GET['p'] ?? 0);
|
||||
|
||||
// Ensure we've got a profile owner if updating.
|
||||
$a->profile['profile_uid'] = $profile_uid;
|
||||
$a->profile['uid'] = $profile_uid;
|
||||
|
||||
$remote_contact = Session::getRemoteContactID($a->profile['profile_uid']);
|
||||
$is_owner = local_user() == $a->profile['profile_uid'];
|
||||
$last_updated_key = "profile:" . $a->profile['profile_uid'] . ":" . local_user() . ":" . $remote_contact;
|
||||
$remote_contact = Session::getRemoteContactID($a->profile['uid']);
|
||||
$is_owner = local_user() == $a->profile['uid'];
|
||||
$last_updated_key = "profile:" . $a->profile['uid'] . ":" . local_user() . ":" . $remote_contact;
|
||||
|
||||
if (!empty($a->profile['hidewall']) && !$is_owner && !$remote_contact) {
|
||||
throw new ForbiddenException(DI::l10n()->t('Access to this profile has been restricted.'));
|
||||
}
|
||||
|
||||
// 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->profile['profile_uid']);
|
||||
$sql_extra = Item::getPermissionsSQLByUserId($a->profile['uid']);
|
||||
|
||||
$last_updated_array = Session::get('last_updated', []);
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Profile extends BaseModule
|
|||
$sql_extra4
|
||||
$sql_extra
|
||||
ORDER BY `item`.`received` DESC",
|
||||
$a->profile['profile_uid'],
|
||||
$a->profile['uid'],
|
||||
GRAVITY_ACTIVITY
|
||||
);
|
||||
|
||||
|
@ -99,7 +99,7 @@ class Profile extends BaseModule
|
|||
|
||||
$items = DBA::toArray($items_stmt);
|
||||
|
||||
$o .= conversation($a, $items, $pager, 'profile', $profile_uid, false, 'received', $a->profile['profile_uid']);
|
||||
$o .= conversation($a, $items, $pager, 'profile', $profile_uid, false, 'received', $a->profile['uid']);
|
||||
|
||||
header("Content-type: text/html");
|
||||
echo "<!DOCTYPE html><html><body>\r\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue