From f6028350ae13ce28a147adad90cf06d4eb39f1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fa=C3=9Fbender?= Date: Wed, 19 Jan 2022 21:19:10 +0100 Subject: [PATCH] save correct parent album --- adm_program/modules/photos/photo_album_function.php | 6 ++++++ adm_program/modules/photos/photo_album_new.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/adm_program/modules/photos/photo_album_function.php b/adm_program/modules/photos/photo_album_function.php index 9bb3766ad5..6c465f6742 100644 --- a/adm_program/modules/photos/photo_album_function.php +++ b/adm_program/modules/photos/photo_album_function.php @@ -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(); diff --git a/adm_program/modules/photos/photo_album_new.php b/adm_program/modules/photos/photo_album_new.php index cd9cdd3a45..c706ee28b2 100644 --- a/adm_program/modules/photos/photo_album_new.php +++ b/adm_program/modules/photos/photo_album_new.php @@ -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(