mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:50:11 +00:00
The "attach" field is now deprecated
This commit is contained in:
parent
d383f49f1e
commit
43749c3069
14 changed files with 91 additions and 99 deletions
|
@ -1119,16 +1119,9 @@ class OStatus
|
|||
if ($filetype == 'image') {
|
||||
$link_data['add_body'] .= "\n[img]".$attribute['href'].'[/img]';
|
||||
} else {
|
||||
if (!empty($item["attach"])) {
|
||||
$item["attach"] .= ',';
|
||||
} else {
|
||||
$item["attach"] = '';
|
||||
}
|
||||
if (!isset($attribute['length'])) {
|
||||
$attribute['length'] = "0";
|
||||
}
|
||||
$item["attach"] .= Post\Media::getAttachElement($attribute['href'],
|
||||
$attribute['length'], $attribute['type'], $attribute['title'] ?? '');
|
||||
Post\Media::insert(['uri-id' => $item['uri-id'], 'type' => Post\Media::DOCUMENT,
|
||||
'url' => $attribute['href'], 'mimetype' => $attribute['type'],
|
||||
'size' => $attribute['length'] ?? null, 'description' => $attribute['title'] ?? null]);
|
||||
}
|
||||
break;
|
||||
case "related":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue