diff --git a/include/items.php b/include/items.php index 08858682e6..2d7597dcd6 100644 --- a/include/items.php +++ b/include/items.php @@ -29,6 +29,10 @@ function add_page_info_data(array $data, $no_photos = false) { Addon::callHooks('page_info_data', $data); + if (empty($data['type'])) { + return ''; + } + // It maybe is a rich content, but if it does have everything that a link has, // then treat it that way if (($data["type"] == "rich") && is_string($data["title"]) && diff --git a/mod/photos.php b/mod/photos.php index 277f5af474..5fb6ba3683 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1394,7 +1394,7 @@ function photos_content(App $a) $a->set_pager_total(DBA::count('item', $condition)); $params = ['order' => ['id'], 'limit' => [$a->pager['start'], $a->pager['itemspage']]]; - $result = Item::selectForUser($link_item['uid'], [], $condition, $params); + $result = Item::selectForUser($link_item['uid'], Item::ITEM_FIELDLIST, $condition, $params); $items = Item::inArray($result); if (local_user() && (local_user() == $link_item['uid'])) { @@ -1569,7 +1569,7 @@ function photos_content(App $a) $body_e = BBCode::convert($item['body']); $comments .= replace_macros($template,[ - '$id' => $item['item_id'], + '$id' => $item['id'], '$profile_url' => $profile_url, '$name' => $item['author-name'], '$thumb' => $item['author-avatar'], diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 5bbdf7c4e0..258bb6c628 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -934,11 +934,12 @@ class Probe $prof_data = []; - // The "addr" is not always part of the fetched data - if (!empty($data["addr"])) { - $prof_data["addr"] = $data["addr"]; + if (empty($data["addr"])) { + $probe_data = self::uri($profile_link); + $data["addr"] = $probe_data["addr"]; } + $prof_data["addr"] = $data["addr"]; $prof_data["nick"] = $data["nick"]; $prof_data["dfrn-request"] = $data["request"]; $prof_data["dfrn-confirm"] = $data["confirm"];