]> 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)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 14 Jan 2022 13:39:04 +0000 (08:39 -0500)
commit235e73e908a602b58565ce6fa37368b9336e5275
treed4c16a7d70c57fe93cdbe00b59f7800ab517eac9
parenta2857053f39e3980773992c8834cf87c2a5be31b
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug_29778.pl [new file with mode: 0755]
tools/additional-contents.pl