forked from Public/pics
Fix recounting not working on non-album tags.
This commit is contained in:
parent
5df7ea8371
commit
d7b68995e8
@ -492,7 +492,7 @@ class Asset
|
||||
'id_asset' => $this->id_asset,
|
||||
]);
|
||||
|
||||
$rows = $db->query('
|
||||
$recount_tags = $db->queryValues('
|
||||
SELECT id_tag
|
||||
FROM assets_tags
|
||||
WHERE id_asset = {int:id_asset}',
|
||||
@ -500,11 +500,6 @@ class Asset
|
||||
'id_asset' => $this->id_asset,
|
||||
]);
|
||||
|
||||
$recount_tags = [];
|
||||
if(!empty($rows))
|
||||
foreach($rows as $row)
|
||||
$recount_tags[] = $row['id_tag'];
|
||||
|
||||
$db->query('
|
||||
DELETE FROM assets_tags
|
||||
WHERE id_asset = {int:id_asset}',
|
||||
@ -524,7 +519,7 @@ class Asset
|
||||
$rows = $db->query('
|
||||
SELECT id_tag
|
||||
FROM tags
|
||||
WHERE id_asset_thumb = {int:id_asset} AND kind = "Album"',
|
||||
WHERE id_asset_thumb = {int:id_asset}',
|
||||
[
|
||||
'id_asset' => $this->id_asset,
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user