From b1a903036966ad4df486d31a72b8a374527affe4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 19 May 2018 06:12:55 +0000 Subject: [PATCH] Fix constant display updates --- mod/display.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mod/display.php b/mod/display.php index 13a0ba465f..fc3ff049d4 100644 --- a/mod/display.php +++ b/mod/display.php @@ -333,13 +333,9 @@ function display_content(App $a, $update = false, $update_uid = 0) { $sql_extra = item_permissions_sql($a->profile['uid'], $remote_contact, $groups); if ($update) { - $r = dba::p("SELECT `id` FROM `item` WHERE - `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?) - $sql_extra AND `unseen`", - $item_id - ); - - if (dba::num_rows($r) == 0) { + if (!dba::exists('item', + ["`item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = ?) + $sql_extra AND `unseen` AND `uid` != 0", $item_id])) { return ''; } }