mirror of
https://github.com/friendica/friendica
synced 2025-04-27 19:50:12 +00:00
The function "getAttachedData" has been removed
This commit is contained in:
parent
27cc346f8a
commit
eafe54f2dd
7 changed files with 56 additions and 299 deletions
|
@ -896,6 +896,13 @@ class Media
|
|||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an [attachment] element to the body for a given uri-id with a HTML media element
|
||||
*
|
||||
* @param integer $uriid
|
||||
* @param string $body
|
||||
* @return string
|
||||
*/
|
||||
public static function addHTMLAttachmentToBody(int $uriid, string $body): string
|
||||
{
|
||||
if (preg_match("/.*(\[attachment.*?\].*?\[\/attachment\]).*/ism", $body, $match)) {
|
||||
|
@ -929,6 +936,13 @@ class Media
|
|||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a link to the body for a given uri-id with a HTML media element
|
||||
*
|
||||
* @param integer $uriid
|
||||
* @param string $body
|
||||
* @return string
|
||||
*/
|
||||
public static function addHTMLLinkToBody(int $uriid, string $body): string
|
||||
{
|
||||
$links = self::getByURIId($uriid, [self::HTML]);
|
||||
|
@ -947,6 +961,12 @@ class Media
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an [attachment] element to the body and a link to raw-body for a given uri-id with a HTML media element
|
||||
*
|
||||
* @param array $item
|
||||
* @return array
|
||||
*/
|
||||
public static function addHTMLAttachmentToItem(array $item): array
|
||||
{
|
||||
if (($item['gravity'] == Item::GRAVITY_ACTIVITY) || empty($item['uri-id'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue