Display hadn't shown public items that weren't known to the user

This commit is contained in:
Michael 2017-08-30 20:20:01 +00:00
parent 0fa84d01b0
commit 5f33f28b9e

View file

@ -382,11 +382,9 @@ function display_content(App $a, $update = 0) {
} }
} }
$r = dba::p(item_query()." AND `item`.`uid` = ? $r = dba::p(item_query()."AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?)
AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?)
$sql_extra $sql_extra
ORDER BY `parent` DESC, `gravity` ASC, `id` ASC", ORDER BY `parent` DESC, `gravity` ASC, `id` ASC",
$a->profile['uid'],
$item_id $item_id
); );
@ -484,12 +482,11 @@ function display_content(App $a, $update = 0) {
return $o; return $o;
} }
$r = dba::fetch_first("SELECT `id`,`deleted` FROM `item` WHERE `id` = ? OR `uri` = ? LIMIT 1", $r = dba::fetch_first("SELECT `id`,`deleted` FROM `item` WHERE `id` = ? OR `uri` = ? LIMIT 1",
$item_id, $item_id,
$item_id $item_id
); );
if ($r) { if (dbm::is_result($r)) {
if ($r['deleted']) { if ($r['deleted']) {
notice(t('Item has been removed.') . EOL); notice(t('Item has been removed.') . EOL);
} else { } else {