Merge pull request #5085 from annando/display-update

Fix constant display updates
This commit is contained in:
Hypolite Petovan 2018-05-19 08:15:59 -04:00 committed by GitHub
commit bba5ce14f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 '';
}
}