]> git.koha-community.org Git - koha.git/commit
Bug 38357: Prevent holidays to be wrongly added
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 6 Nov 2024 08:37:02 +0000 (09:37 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 5 Dec 2024 22:46:15 +0000 (22:46 +0000)
commit5f5a0b225fa06313047f4c7d7fde4f1f9d904411
tree5830133990b76d7b6b5c036b164565f220b0f798
parent561b8cdacbb607cf27f2e20d3bc770d0eb66019a
Bug 38357: Prevent holidays to be wrongly added

This patch resets @holiday_list to an empty array, to prevent holidays
to be accumulated in worker's memory.

If you added single holidays to library A then others to library B,
holidays from A were also added to B.

Test plan:
Go to /cgi-bin/koha/tools/holidays.pl
Define the holidays for Centerville
 Select a date
 To: another date (pick only 2 days to ease testing)
 Set a title "cpl"
 Tick "Holidays on a range"
 Save
Define the holidays for Fairview
 Select *another* date
 To: another date (pick only 2 days to ease testing)
 Set a title "fpl"
 Tick "Holidays on a range"
 Save

=> Without this patch Fairview has 4 days of holidays instead of 2
=> With this patch applied the dates you selected are considered
holidays for Fairview

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 43e22821a99bc9fee50354039f1215f8ff662b5a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
tools/newHolidays.pl