mirror of
https://github.com/friendica/friendica
synced 2025-04-23 00:30:11 +00:00
Added support for "Tumblr Neue Post Format"
This commit is contained in:
parent
08d1e484e3
commit
aca4b2eaae
2 changed files with 476 additions and 0 deletions
|
@ -757,6 +757,17 @@ class Media
|
|||
return DBA::selectToArray('post-media', [], $condition, ['order' => ['id']]);
|
||||
}
|
||||
|
||||
public static function getByURL(int $uri_id, string $url, array $types = [])
|
||||
{
|
||||
$condition = ["`uri-id` = ? AND `url` = ? AND `type` != ?", $uri_id, $url, self::UNKNOWN];
|
||||
|
||||
if (!empty($types)) {
|
||||
$condition = DBA::mergeConditions($condition, ['type' => $types]);
|
||||
}
|
||||
|
||||
return DBA::selectFirst('post-media', [], $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the media attachment with the provided media id.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue