This commit is contained in:
parent
e48c608db0
commit
fe74db6311
1 changed files with 16 additions and 13 deletions
|
@ -19,10 +19,10 @@ use Friendica\Model\Contact;
|
||||||
use Friendica\Model\Group;
|
use Friendica\Model\Group;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
|
use Friendica\Module\Objects;
|
||||||
use Friendica\Protocol\ActivityPub;
|
use Friendica\Protocol\ActivityPub;
|
||||||
use Friendica\Protocol\DFRN;
|
use Friendica\Protocol\DFRN;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Module\Objects;
|
|
||||||
|
|
||||||
function display_init(App $a)
|
function display_init(App $a)
|
||||||
{
|
{
|
||||||
|
@ -283,22 +283,25 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
||||||
$is_remote_contact = false;
|
$is_remote_contact = false;
|
||||||
$item_uid = local_user();
|
$item_uid = local_user();
|
||||||
|
|
||||||
$parent = Item::selectFirst(['uid'], ['uri' => $item_parent_uri, 'wall' => true]);
|
if (isset($item_parent_uri)) {
|
||||||
if (DBA::isResult($parent)) {
|
$parent = Item::selectFirst(['uid'], ['uri' => $item_parent_uri, 'wall' => true]);
|
||||||
$a->profile['uid'] = defaults($a->profile, 'uid', $parent['uid']);
|
if (DBA::isResult($parent)) {
|
||||||
$a->profile['profile_uid'] = defaults($a->profile, 'profile_uid', $parent['uid']);
|
$a->profile['uid'] = defaults($a->profile, 'uid', $parent['uid']);
|
||||||
$is_remote_contact = Contact::isFollower(remote_user(), $a->profile['profile_uid']);
|
$a->profile['profile_uid'] = defaults($a->profile, 'profile_uid', $parent['uid']);
|
||||||
}
|
$is_remote_contact = Contact::isFollower(remote_user(), $a->profile['profile_uid']);
|
||||||
|
|
||||||
if ($is_remote_contact) {
|
if ($is_remote_contact) {
|
||||||
$cdata = Contact::getPublicAndUserContacID(remote_user(), $a->profile['profile_uid']);
|
$cdata = Contact::getPublicAndUserContacID(remote_user(), $a->profile['profile_uid']);
|
||||||
if (!empty($cdata['user'])) {
|
if (!empty($cdata['user'])) {
|
||||||
$groups = Group::getIdsByContactId($cdata['user']);
|
$groups = Group::getIdsByContactId($cdata['user']);
|
||||||
$remote_cid = $cdata['user'];
|
$remote_cid = $cdata['user'];
|
||||||
$item_uid = $parent['uid'];
|
$item_uid = $parent['uid'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$page_contact = DBA::selectFirst('contact', [], ['self' => true, 'uid' => $a->profile['uid']]);
|
$page_contact = DBA::selectFirst('contact', [], ['self' => true, 'uid' => $a->profile['uid']]);
|
||||||
if (DBA::isResult($page_contact)) {
|
if (DBA::isResult($page_contact)) {
|
||||||
$a->page_contact = $page_contact;
|
$a->page_contact = $page_contact;
|
||||||
|
|
Loading…
Reference in a new issue