From a53add06f2e7fdcc8a0bec852ee61fc8a106007a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 2 Dec 2021 09:44:41 -0500 Subject: [PATCH 1/2] Fix wrong call to module in mod/display --- mod/display.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/display.php b/mod/display.php index daa78b03e1..b87e075488 100644 --- a/mod/display.php +++ b/mod/display.php @@ -40,7 +40,7 @@ use Friendica\Protocol\DFRN; function display_init(App $a) { if (ActivityPub::isRequest()) { - (new Objects(DI::l10n(), ['guid' => DI::args()->getArgv()[1] ?? null]))->rawContent(); + (new Objects(DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), $_SERVER, ['guid' => DI::args()->getArgv()[1] ?? null]))->run(); } if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) { From e7d87d35240c154387a41d60abb4a676ea0e6d28 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 2 Dec 2021 09:45:32 -0500 Subject: [PATCH 2/2] Suppress notice messages related to the VCard::getHTML call in mod/display - Address https://soc.schuerz.at/display/4edd2508-6661-a8d1-f168-b2a245440386 --- mod/display.php | 2 +- src/Content/Widget/VCard.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/display.php b/mod/display.php index b87e075488..3181d5b450 100644 --- a/mod/display.php +++ b/mod/display.php @@ -121,7 +121,7 @@ function display_fetchauthor($item) $shared = Item::getShareArray($item); if (!empty($shared) && empty($shared['comment'])) { $profiledata = [ - 'uid' => -1, + 'uid' => 0, 'id' => -1, 'nickname' => '', 'name' => '', diff --git a/src/Content/Widget/VCard.php b/src/Content/Widget/VCard.php index 38b75272f5..81a1d0cf7a 100644 --- a/src/Content/Widget/VCard.php +++ b/src/Content/Widget/VCard.php @@ -75,7 +75,7 @@ class VCard $pending = $pcontact['pending'] ?? false; } - if (!$contact['self'] && Protocol::supportsFollow($contact['network'])) { + if (empty($contact['self']) && Protocol::supportsFollow($contact['network'])) { if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) { $unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1'; } elseif (!$pending) {