Merge pull request #14565 from annando/media-insert

New function to update media entries
This commit is contained in:
Hypolite Petovan 2024-11-20 12:24:39 -05:00 committed by GitHub
commit e88606a4f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -846,7 +846,7 @@ class Media
} }
/** /**
* Update post-media entries * Update post-media entries by id
* *
* @param array $fields * @param array $fields
* @param int $id * @param int $id
@ -857,6 +857,18 @@ class Media
return DBA::update('post-media', $fields, ['id' => $id]); 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. * Checks if media attachments are associated with the provided item ID.
* *