From d8447469b6fc120b87575b118186c0fcba51352c Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 1 Oct 2021 05:26:13 +0000 Subject: [PATCH 1/2] Prefer the local user when displaying items --- mod/display.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/display.php b/mod/display.php index d465170321..d854be45e2 100644 --- a/mod/display.php +++ b/mod/display.php @@ -246,11 +246,11 @@ function display_content(App $a, $update = false, $update_uid = 0) $page_uid = 0; $parent = null; - if (!empty($parent_uri_id)) { + if (!local_user() && !empty($parent_uri_id)) { $parent = Post::selectFirst(['uid'], ['uri-id' => $parent_uri_id, 'wall' => true]); } - if (DBA::isResult($parent)) { + if (!local_user() && DBA::isResult($parent)) { $page_uid = $page_uid ?? 0 ?: $parent['uid']; $is_remote_contact = Session::getRemoteContactID($page_uid); if ($is_remote_contact) { From 6a444d8e13006f586c77e7d40a753c3a950477c5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 1 Oct 2021 16:28:33 +0200 Subject: [PATCH 2/2] Update mod/display.php Co-authored-by: Hypolite Petovan --- mod/display.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/display.php b/mod/display.php index d854be45e2..87775126e6 100644 --- a/mod/display.php +++ b/mod/display.php @@ -250,7 +250,7 @@ function display_content(App $a, $update = false, $update_uid = 0) $parent = Post::selectFirst(['uid'], ['uri-id' => $parent_uri_id, 'wall' => true]); } - if (!local_user() && DBA::isResult($parent)) { + if (DBA::isResult($parent)) { $page_uid = $page_uid ?? 0 ?: $parent['uid']; $is_remote_contact = Session::getRemoteContactID($page_uid); if ($is_remote_contact) {