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