]> git.koha-community.org Git - koha.git/commit
Bug 29778: Prevent orphan additional contents
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 3 Jan 2022 10:31:54 +0000 (11:31 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 10 Jan 2022 07:04:17 +0000 (21:04 -1000)
commit0c4590160aabaa3adb082554c8173ee4f641dff6
tree5642bfae15209d56752a1472da07fcbb29dd2474
parentcb6ef3ac19a6e10c4aa878904788832b3fd9eed4
Bug 29778: Prevent orphan additional contents

When deleting a content, only the main one (lang="default") is removed,
which leads to orphan contents in the DB that are still displayed on the
UI.

Test plan:
0. Don't apply this patch
1. Create some contents, translate them in different languages
2. Delete some of them
=> Note that they are still displayed on the UI and that the entries
with lang!="default" are still in the DB
3. Apply this patch
4. Repeat 1
5. Run updatedatabase
6. Delete from of the contents
=> Note that the orphan entries created before you applied the patch
have been removed and that the "delete" behaviour is now working
correnctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/bug_29778.pl [new file with mode: 0755]
tools/additional-contents.pl