mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +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
|
@ -86,6 +86,22 @@ class Media
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy attachments from one uri-id to another
|
||||
*
|
||||
* @param integer $from_uri_id
|
||||
* @param integer $to_uri_id
|
||||
* @return void
|
||||
*/
|
||||
public static function copy(int $from_uri_id, int $to_uri_id)
|
||||
{
|
||||
$attachments = self::getByURIId($from_uri_id);
|
||||
foreach ($attachments as $attachment) {
|
||||
$attachment['uri-id'] = $to_uri_id;
|
||||
self::insert($attachment);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the "[attach]" element from the given attributes
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue