https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42314
--- Comment #20 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 203313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203313&action=edit Bug 42314: (follow-up) Simplify list_closed_dates using closed_dates_in_range Related to Bug 42206 (which introduced the list_closed_dates controller) and Bug 42310 (which added the closed_dates_in_range accessor). The list_closed_dates controller previously reached into Koha::Calendar private state ($calendar->_holidays, $calendar->{weekly_closed_days}, $calendar->{day_month_closed_days}) to compute the closed-dates list. This broke encapsulation and would silently break if Koha::Calendar internals changed. Replace that block with a single call to the public Koha::Calendar->closed_dates_in_range accessor, chained off the Koha::Library->calendar accessor added in this bug. Test plan: 1. prove t/db_dependent/api/v1/libraries.t 2. GET /api/v1/libraries/{id}/closed_dates still returns the same list across weekly, repeating, single and exception scenarios Signed-off-by: Tomás Cohen Arazi <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
