X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=880cfd44b86eb6af3280594f717b4ce74ebb4199;hb=e555ea6aadaaaa178f108b313b728a7b6144b42f;hp=50f405495600c531e9f6fbca5719502406167981;hpb=b2042253c45f7925d515d8c6b8fdd4a73c2ee784;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 50f4054956..880cfd44b8 100644 --- a/mod/display.php +++ b/mod/display.php @@ -1,6 +1,6 @@ 0, - 'id' => -1, - 'nickname' => '', - 'name' => '', - 'picdate' => '', - 'photo' => '', - 'url' => '', - 'network' => '', - ]; - - if (!empty($shared['author'])) { - $profiledata['name'] = $shared['author']; - } - + if (Diaspora::isReshare($item['body'], true)) { + $shared = Item::getShareArray($item); if (!empty($shared['profile'])) { - $profiledata['url'] = $shared['profile']; - } - - if (!empty($shared['avatar'])) { - $profiledata['photo'] = $shared['avatar']; + $contact = Contact::getByURLForUser($shared['profile'], local_user()); } - - $profiledata['nickname'] = $profiledata['name']; - $profiledata['network'] = Protocol::PHANTOM; - - $profiledata['address'] = ''; - $profiledata['about'] = ''; - - $profiledata = Contact::getByURLForUser($profiledata['url'], local_user()) ?: $profiledata; } - if (!empty($profiledata['photo'])) { - $profiledata['photo'] = DI::baseUrl()->remove($profiledata['photo']); + if (empty($contact)) { + $contact = Contact::getById($item['author-id']); } - return $profiledata; + return $contact; } function display_content(App $a, $update = false, $update_uid = 0) @@ -374,7 +344,6 @@ function displayShowFeed(int $uri_id, int $uid, bool $conversation) if ($xml == '') { throw new HTTPException\InternalServerErrorException(DI::l10n()->t('The feed for this item is unavailable.')); } - header("Content-type: application/atom+xml"); - echo $xml; - exit(); + + System::httpExit($xml, Response::TYPE_ATOM); }