EditAsset: replace Asset::setKeyData with Asset::save equivalent
This commit is contained in:
parent
022b1001be
commit
2aa978326c
@ -77,10 +77,12 @@ class EditAsset extends HTMLController
|
|||||||
// Key info
|
// Key info
|
||||||
if (isset($_POST['title'], $_POST['slug'], $_POST['date_captured'], $_POST['priority']))
|
if (isset($_POST['title'], $_POST['slug'], $_POST['date_captured'], $_POST['priority']))
|
||||||
{
|
{
|
||||||
$date_captured = !empty($_POST['date_captured']) ?
|
$asset->date_captured = !empty($_POST['date_captured']) ?
|
||||||
new DateTime(str_replace('T', ' ', $_POST['date_captured'])) : null;
|
new DateTime(str_replace('T', ' ', $_POST['date_captured'])) : null;
|
||||||
$slug = Asset::cleanSlug($_POST['slug']);
|
$asset->slug = Asset::cleanSlug($_POST['slug']);
|
||||||
$asset->setKeyData(htmlspecialchars($_POST['title']), $slug, $date_captured, intval($_POST['priority']));
|
$asset->title = htmlspecialchars($_POST['title']);
|
||||||
|
$asset->priority = intval($_POST['priority']);
|
||||||
|
$asset->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changing parent album?
|
// Changing parent album?
|
||||||
|
Loading…
Reference in New Issue
Block a user