mirror of
https://github.com/friendica/friendica
synced 2025-04-25 14:30:10 +00:00
Use centralized function to fetch query results
This commit is contained in:
parent
2764859350
commit
69b7923df2
4 changed files with 16 additions and 3 deletions
|
@ -58,4 +58,17 @@ class Collection
|
|||
|
||||
DBA::delete('post-collection', ['uri-id' => $uri_id, 'type' => $type]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch collections for a given contact
|
||||
*
|
||||
* @param integer $cid
|
||||
* @param [type] $type
|
||||
* @param array $fields
|
||||
* @return array
|
||||
*/
|
||||
public static function selectToArrayForContact(int $cid, int $type = self::FEATURED, array $fields = [])
|
||||
{
|
||||
return DBA::selectToArray('collection-view', $fields, ['cid' => $cid, 'type' => $type]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue