Skip to content

Commit

Permalink
save correct parent album
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Jan 19, 2022
1 parent 8756205 commit f602835
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions adm_program/modules/photos/photo_album_function.php
Expand Up @@ -111,6 +111,12 @@
}
}

if($_POST['parent_album_uuid'] !== 'ALL') {
$parentAlbum = new TablePhotos($gDb);
$parentAlbum->readDataByUuid($_POST['parent_album_uuid']);
$photoAlbum->setValue('pho_pho_id_parent', $parentAlbum->getValue('pho_id'));
}

if ($getMode === 'new') {
// write recordset with new album into database
$photoAlbum->save();
Expand Down
2 changes: 1 addition & 1 deletion adm_program/modules/photos/photo_album_new.php
Expand Up @@ -120,7 +120,7 @@ function subfolder($parentId, $vorschub, TablePhotos $photoAlbum, $phoId)
);
subfolder(0, '', $photoAlbum, $photoAlbum->getValue('pho_id'));
$form->addSelectBox(
'pho_pho_id_parent',
'parent_album_uuid',
$gL10n->get('PHO_PARENT_ALBUM'),
$photoAlbumsArray,
array(
Expand Down

0 comments on commit f602835

Please sign in to comment.