forked from Public/pics
Set tag cover photo automatically on upload.
This commit is contained in:
parent
2d77fbdbb7
commit
e7e3a4368a
1
TODO.md
1
TODO.md
@ -1,5 +1,4 @@
|
||||
TODO:
|
||||
|
||||
* Taggen door gebruikers
|
||||
* Uploaden door gebruikers
|
||||
* Album management
|
||||
|
@ -40,6 +40,9 @@ class UploadMedia extends HTMLController
|
||||
|
||||
$new_ids[] = $asset->getId();
|
||||
$asset->linkTags([$tag->id_tag]);
|
||||
|
||||
$tag->id_asset_thumb = $asset->getId();
|
||||
$tag->save();
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['format']) && $_REQUEST['format'] === 'json')
|
||||
|
@ -10,7 +10,7 @@ class Tag
|
||||
{
|
||||
public $id_tag;
|
||||
public $id_parent;
|
||||
public $id_asset_id;
|
||||
public $id_asset_thumb;
|
||||
public $tag;
|
||||
public $slug;
|
||||
public $description;
|
||||
@ -254,6 +254,8 @@ class Tag
|
||||
return Registry::get('db')->query('
|
||||
UPDATE tags
|
||||
SET
|
||||
id_parent = {int:id_parent},
|
||||
id_asset_thumb = {int:id_asset_thumb},
|
||||
tag = {string:tag},
|
||||
count = {int:count}
|
||||
WHERE id_tag = {int:id_tag}',
|
||||
|
Loading…
Reference in New Issue
Block a user