Hide thumbnail selection when none available

This commit is contained in:
Aaron van Geffen 2023-03-11 20:37:39 +01:00
parent 167a50cb92
commit 310fe7c3d6
2 changed files with 4 additions and 2 deletions

View File

@ -132,7 +132,8 @@ class EditAlbum extends HTMLController
'id_tag' => $id_tag,
], true);
$this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $album->id_asset_thumb : 0));
if ($num_assets > 0)
$this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $album->id_asset_thumb : 0));
}
if (isset($_POST['changeThumbnail']))

View File

@ -123,7 +123,8 @@ class EditTag extends HTMLController
'id_tag' => $id_tag,
], true);
$this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $tag->id_asset_thumb : 0));
if ($num_assets > 0)
$this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $tag->id_asset_thumb : 0));
}
if (isset($_POST['changeThumbnail']))