X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=2e931e0687e60b2d02189c33a1dd18303977c118;hb=85ff976f83b1037328fedd26fd817c720625e0e9;hp=054ba1924ff2b0b1640655170fa4b05094a7d182;hpb=acaee626f5f23f4c1dc19c31896a0797a251b58f;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 054ba1924f..2e931e0687 100644 --- a/mod/display.php +++ b/mod/display.php @@ -35,7 +35,6 @@ function display_init(App $a) } $nick = (($a->argc > 1) ? $a->argv[1] : ''); - $profiledata = []; if ($a->argc == 3) { if (substr($a->argv[2], -5) == '.atom') { @@ -96,7 +95,7 @@ function display_init(App $a) } if ($item["id"] != $item["parent"]) { - $item = Item::selectFirstForUser(local_user(), $fields, ['id' => $item["parent"]]); + $item = Item::selectFirstForUser($item_user, $fields, ['id' => $item["parent"]]); } $profiledata = display_fetchauthor($a, $item); @@ -157,7 +156,6 @@ function display_fetchauthor($a, $item) } if (!$skip) { - $author = ""; preg_match("/author='(.*?)'/ism", $attributes, $matches); if (!empty($matches[1])) { $profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8'); @@ -166,7 +164,6 @@ function display_fetchauthor($a, $item) if (!empty($matches[1])) { $profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8'); } - $profile = ""; preg_match("/profile='(.*?)'/ism", $attributes, $matches); if (!empty($matches[1])) { $profiledata["url"] = $matches[1]; @@ -175,7 +172,6 @@ function display_fetchauthor($a, $item) if (!empty($matches[1])) { $profiledata["url"] = $matches[1]; } - $avatar = ""; preg_match("/avatar='(.*?)'/ism", $attributes, $matches); if (!empty($matches[1])) { $profiledata["photo"] = $matches[1]; @@ -289,8 +285,8 @@ function display_content(App $a, $update = false, $update_uid = 0) $parent = Item::selectFirst(['uid'], ['uri' => $item_parent_uri, 'wall' => true]); if (DBA::isResult($parent)) { - $a->profile['uid'] = $parent['uid']; - $a->profile['profile_uid'] = $parent['uid']; + $a->profile['uid'] = defaults($a->profile, 'uid', $parent['uid']); + $a->profile['profile_uid'] = defaults($a->profile, 'profile_uid', $parent['uid']); $is_remote_contact = Contact::isFollower(remote_user(), $a->profile['profile_uid']); } @@ -426,5 +422,5 @@ function displayShowFeed($item_id, $conversation) } header("Content-type: application/atom+xml"); echo $xml; - killme(); + exit(); }