mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07: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
|
@ -2146,9 +2146,9 @@ class DFRN
|
|||
{
|
||||
$rel = "";
|
||||
$href = "";
|
||||
$type = "";
|
||||
$length = "0";
|
||||
$title = "";
|
||||
$type = null;
|
||||
$length = null;
|
||||
$title = null;
|
||||
foreach ($links as $link) {
|
||||
foreach ($link->attributes as $attributes) {
|
||||
switch ($attributes->name) {
|
||||
|
@ -2165,13 +2165,8 @@ class DFRN
|
|||
$item["plink"] = $href;
|
||||
break;
|
||||
case "enclosure":
|
||||
if (!empty($item["attach"])) {
|
||||
$item["attach"] .= ",";
|
||||
} else {
|
||||
$item["attach"] = "";
|
||||
}
|
||||
|
||||
$item["attach"] .= Post\Media::getAttachElement($href, $length, $type, $title);
|
||||
Post\Media::insert(['uri-id' => $item['uri-id'], 'type' => Post\Media::DOCUMENT,
|
||||
'url' => $href, 'mimetype' => $type, 'size' => $length, 'description' => $title]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue