From 9ebb2c6527499c1a398491445700fa5651cb475e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 27 May 2020 08:28:09 -0400 Subject: [PATCH] Implement existing force query string parameter in mod/update_display - Prevented single item display update when "like" interactions were removed because the item wasn't "unseen" --- mod/display.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/display.php b/mod/display.php index a06d8a723..9ab25a96b 100644 --- a/mod/display.php +++ b/mod/display.php @@ -183,6 +183,8 @@ function display_content(App $a, $update = false, $update_uid = 0) $item = null; + $force = (bool)($_REQUEST['force'] ?? false); + if ($update) { $item_id = $_REQUEST['item_id']; $item = Item::selectFirst(['uid', 'parent', 'parent-uri'], ['id' => $item_id]); @@ -281,7 +283,7 @@ function display_content(App $a, $update = false, $update_uid = 0) } // We need the editor here to be able to reshare an item. - if ($is_owner) { + if ($is_owner && !$update) { $x = [ 'is_owner' => true, 'allow_location' => $a->user['allow_location'], @@ -304,7 +306,7 @@ function display_content(App $a, $update = false, $update_uid = 0) $unseen = false; } - if ($update && !$unseen) { + if ($update && !$unseen && !$force) { return ''; }