mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
Merge pull request #11402 from annando/featured-endpoint
We now offer an endpoint for featured posts
This commit is contained in:
commit
3842f02b02
44 changed files with 265 additions and 173 deletions
|
@ -1474,7 +1474,8 @@ class Contact
|
|||
if ($pager->getStart() == 0) {
|
||||
$cdata = Contact::getPublicAndUserContactID($cid, local_user());
|
||||
if (!empty($cdata['public'])) {
|
||||
$condition = ["`uri-id` IN (SELECT `uri-id` FROM `collection-view` WHERE `cid` = ?)", $cdata['public']];
|
||||
$condition = ["`uri-id` IN (SELECT `uri-id` FROM `collection-view` WHERE `cid` = ? AND `type` = ?)",
|
||||
$cdata['public'], Post\Collection::FEATURED];
|
||||
$pinned = Post::toArray(Post::selectForUser(local_user(), $fields, $condition, $params));
|
||||
$items = array_merge($pinned, $items);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue