mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:10:12 +00:00
"uri-id" instead of "uri" or "id"
This commit is contained in:
parent
a7b07b6e2e
commit
ef0400fc19
11 changed files with 130 additions and 147 deletions
|
@ -310,23 +310,26 @@ class DFRN
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate an atom entry for a given item id
|
||||
* Generate an atom entry for a given uri id and user
|
||||
*
|
||||
* @param int $item_id The item id
|
||||
* @param int $uri_id The uri id
|
||||
* @param int $uid The user id
|
||||
* @param boolean $conversation Show the conversation. If false show the single post.
|
||||
*
|
||||
* @return string DFRN feed entry
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function itemFeed($item_id, $conversation = false)
|
||||
public static function itemFeed(int $uri_id, int $uid, bool $conversation = false)
|
||||
{
|
||||
if ($conversation) {
|
||||
$condition = ['parent' => $item_id];
|
||||
$condition = ['parent-uri-id' => $uri_id];
|
||||
} else {
|
||||
$condition = ['id' => $item_id];
|
||||
$condition = ['uri-id' => $uri_id];
|
||||
}
|
||||
|
||||
$condition['uid'] = $uid;
|
||||
|
||||
$items = Post::selectToArray(Item::DELIVER_FIELDLIST, $condition);
|
||||
if (!DBA::isResult($items)) {
|
||||
return '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue