Asset: remove old setKeyData method

This commit is contained in:
Aaron van Geffen 2024-01-17 17:54:18 +01:00
parent 2aa978326c
commit 81acd5c3e8

View File

@ -697,28 +697,6 @@ class Asset
get_object_vars($this)); get_object_vars($this));
} }
public function setKeyData($title, $slug, DateTime $date_captured = null, $priority)
{
$params = [
'id_asset' => $this->id_asset,
'title' => $title,
'slug' => $slug,
'priority' => $priority,
];
if (isset($date_captured))
$params['date_captured'] = $date_captured->format('Y-m-d H:i:s');
return Registry::get('db')->query('
UPDATE assets
SET title = {string:title},
slug = {string:slug},' . (isset($date_captured) ? '
date_captured = {datetime:date_captured},' : '') . '
priority = {int:priority}
WHERE id_asset = {int:id_asset}',
$params);
}
public function getUrlForPreviousInSet(?Tag $tag) public function getUrlForPreviousInSet(?Tag $tag)
{ {
$row = Registry::get('db')->queryAssoc(' $row = Registry::get('db')->queryAssoc('