From: Michael Vogel Date: Tue, 31 Jul 2018 02:23:48 +0000 (+0200) Subject: Fix for vanishing notes (#5531) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c39e0dcf2a97a850c8a2cb39a05651075c295e18;p=friendica.git Fix for vanishing notes (#5531) * Fix for vanishing notes * The field needs to be part of the selected fields ... --- diff --git a/mod/notes.php b/mod/notes.php index ed54330b3c..608d01cf8c 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -59,7 +59,7 @@ function notes_content(App $a, $update = false) } $condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT, - 'wall' => false, 'allow_cid' => '<' . $a->contact['id'] . '>', 'contact-id'=> $a->contact['id']]; + 'wall' => false, 'contact-id'=> $a->contact['id']]; $a->set_pager_itemspage(40); diff --git a/src/Model/Item.php b/src/Model/Item.php index 11de99bc46..e02be950b1 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2855,7 +2855,7 @@ class Item extends BaseObject $condition[] = $days; } - $items = self::select(['file', 'resource-id', 'starred', 'type', 'id'], $condition); + $items = self::select(['file', 'resource-id', 'starred', 'type', 'id', 'post-type'], $condition); if (!DBA::isResult($items)) { return; @@ -2887,9 +2887,9 @@ class Item extends BaseObject continue; } elseif (!$expire_starred && intval($item['starred'])) { continue; - } elseif (!$expire_notes && $item['type'] == 'note') { + } elseif (!$expire_notes && (($item['type'] == 'note') || ($item['post-type'] == Item::PT_PERSONAL_NOTE))) { continue; - } elseif (!$expire_items && $item['type'] != 'note') { + } elseif (!$expire_items && ($item['type'] != 'note') && ($item['post-type'] != Item::PT_PERSONAL_NOTE)) { continue; }