mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Fix for vanishing notes (#5531)
* Fix for vanishing notes * The field needs to be part of the selected fields ...
This commit is contained in:
parent
4d39164c1e
commit
c39e0dcf2a
2 changed files with 4 additions and 4 deletions
|
@ -59,7 +59,7 @@ function notes_content(App $a, $update = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
|
$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);
|
$a->set_pager_itemspage(40);
|
||||||
|
|
||||||
|
|
|
@ -2855,7 +2855,7 @@ class Item extends BaseObject
|
||||||
$condition[] = $days;
|
$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)) {
|
if (!DBA::isResult($items)) {
|
||||||
return;
|
return;
|
||||||
|
@ -2887,9 +2887,9 @@ class Item extends BaseObject
|
||||||
continue;
|
continue;
|
||||||
} elseif (!$expire_starred && intval($item['starred'])) {
|
} elseif (!$expire_starred && intval($item['starred'])) {
|
||||||
continue;
|
continue;
|
||||||
} elseif (!$expire_notes && $item['type'] == 'note') {
|
} elseif (!$expire_notes && (($item['type'] == 'note') || ($item['post-type'] == Item::PT_PERSONAL_NOTE))) {
|
||||||
continue;
|
continue;
|
||||||
} elseif (!$expire_items && $item['type'] != 'note') {
|
} elseif (!$expire_items && ($item['type'] != 'note') && ($item['post-type'] != Item::PT_PERSONAL_NOTE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue