mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:40:17 +00:00
Merge pull request #14565 from annando/media-insert
New function to update media entries
This commit is contained in:
commit
e88606a4f8
1 changed files with 13 additions and 1 deletions
|
@ -846,7 +846,7 @@ class Media
|
|||
}
|
||||
|
||||
/**
|
||||
* Update post-media entries
|
||||
* Update post-media entries by id
|
||||
*
|
||||
* @param array $fields
|
||||
* @param int $id
|
||||
|
@ -857,6 +857,18 @@ class Media
|
|||
return DBA::update('post-media', $fields, ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update post-media entries
|
||||
*
|
||||
* @param array $fields
|
||||
* @param array $condition
|
||||
* @return boolean
|
||||
*/
|
||||
public static function update(array $fields, array $condition): bool
|
||||
{
|
||||
return DBA::update('post-media', $fields, $condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if media attachments are associated with the provided item ID.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue