GalleryFile now sets Album thumbnail if Album doesnt have one

This commit is contained in:
Doug Bell 2008-04-18 00:28:26 +00:00
parent d28c2dc854
commit d2faf8cd23
3 changed files with 9 additions and 127 deletions

View file

@ -577,6 +577,13 @@ sub processPropertiesFromFormPost {
### Passes all checks
# If the album doesn't yet have a thumbnail, make this File the thumbnail
if ( !$self->getParent->get('assetIdThumbnail') ) {
$self->getParent->update( {
assetIdThumbnail => $self->getId,
} );
}
$self->requestAutoCommit;
return;