X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=880cfd44b86eb6af3280594f717b4ce74ebb4199;hb=e555ea6aadaaaa178f108b313b728a7b6144b42f;hp=3181d5b450a29d7ca75940a10724a0b17e5b7dd2;hpb=e7d87d35240c154387a41d60abb4a676ea0e6d28;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 3181d5b450..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::matchByProfileUrl($profiledata['url']); - - $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); }