From 5f33f28b9eab0d8ddf2c226c0a470a75aa5b8559 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 30 Aug 2017 20:20:01 +0000 Subject: [PATCH] Display hadn't shown public items that weren't known to the user --- mod/display.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mod/display.php b/mod/display.php index b76fe1d483..56f7aa6442 100644 --- a/mod/display.php +++ b/mod/display.php @@ -382,11 +382,9 @@ function display_content(App $a, $update = 0) { } } - $r = dba::p(item_query()." AND `item`.`uid` = ? - AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?) + $r = dba::p(item_query()."AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?) $sql_extra ORDER BY `parent` DESC, `gravity` ASC, `id` ASC", - $a->profile['uid'], $item_id ); @@ -484,12 +482,11 @@ function display_content(App $a, $update = 0) { return $o; } - $r = dba::fetch_first("SELECT `id`,`deleted` FROM `item` WHERE `id` = ? OR `uri` = ? LIMIT 1", $item_id, $item_id ); - if ($r) { + if (dbm::is_result($r)) { if ($r['deleted']) { notice(t('Item has been removed.') . EOL); } else { -- 2.39.5