Updated messages.po / type added to query

This commit is contained in:
Michael 2022-04-08 04:17:52 +00:00
parent 75bc4eccb7
commit 6c8ea1d0d8
3 changed files with 264 additions and 266 deletions

View file

@ -1460,8 +1460,10 @@ class Contact
if ($pager->getStart() == 0) { if ($pager->getStart() == 0) {
$cdata = Contact::getPublicAndUserContactID($cid, local_user()); $cdata = Contact::getPublicAndUserContactID($cid, local_user());
$pinned = DBA::selectToArray('collection-view', ['uri-id'], ['cid' => $cdata['public']]); if (!empty($cdata['public'])) {
$items = array_merge($items, $pinned); $pinned = DBA::selectToArray('collection-view', ['uri-id'], ['cid' => $cdata['public'], 'type' => Post\Collection::FEATURED]);
$items = array_merge($items, $pinned);
}
} }
$o .= DI::conversation()->create($items, 'contacts', $update, false, 'pinned_commented', local_user()); $o .= DI::conversation()->create($items, 'contacts', $update, false, 'pinned_commented', local_user());
@ -1471,10 +1473,11 @@ class Contact
if ($pager->getStart() == 0) { if ($pager->getStart() == 0) {
$cdata = Contact::getPublicAndUserContactID($cid, local_user()); $cdata = Contact::getPublicAndUserContactID($cid, local_user());
$condition = ["`uri-id` IN (SELECT `uri-id` FROM `collection-view` WHERE `cid` = ?)", $cdata['public']]; if (!empty($cdata['public'])) {
$pinned = Post::toArray(Post::selectForUser(local_user(), $fields, $condition, $params)); $condition = ["`uri-id` IN (SELECT `uri-id` FROM `collection-view` WHERE `cid` = ?)", $cdata['public']];
//$items = $pinned; $pinned = Post::toArray(Post::selectForUser(local_user(), $fields, $condition, $params));
$items = array_merge($pinned, $items); $items = array_merge($pinned, $items);
}
} }
$o .= DI::conversation()->create($items, 'contact-posts', $update); $o .= DI::conversation()->create($items, 'contact-posts', $update);

View file

@ -209,7 +209,7 @@ class Status extends BaseProfile
if ($pager->getStart() == 0 && !empty($profile['uid'])) { if ($pager->getStart() == 0 && !empty($profile['uid'])) {
$pcid = Contact::getPublicIdByUserId($profile['uid']); $pcid = Contact::getPublicIdByUserId($profile['uid']);
$pinned = DBA::selectToArray('collection-view', [], ['cid' => $pcid]); $pinned = DBA::selectToArray('collection-view', [], ['cid' => $pcid, 'type' => Post\Collection::FEATURED]);
$items = array_merge($items, $pinned); $items = array_merge($items, $pinned);
} }

File diff suppressed because it is too large Load diff