Koha-clms/Koha/Template
Martin Renvoize fa67c646a9
Bug 39781: (QA follow-up) Fix crashes, dead code and add tests
- Fix potential crash when C4::Context->userenv returns undef:
  use the established ternary guard pattern used throughout other
  TT plugins (AuthorisedValues, Branches, Desks, etc.)
- Remove dead second argument passed to GetLettersAvailableForALibrary,
  which only accepts one argument; the group_by/columns/order_by
  hashref was silently dropped
- Fix typo "librries" -> "libraries" in GetByModuleForLibrary POD
- Update POD example to use 'add_message' module matching actual usage
- Add test coverage for GetByModuleForLibrary, verifying that a user
  logged in to a branch sees branch-specific and all-libraries notices,
  while users at other branches see only all-libraries notices

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit b18fbab806)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-03-25 08:49:53 +00:00
..
Plugin Bug 39781: (QA follow-up) Fix crashes, dead code and add tests 2026-03-25 08:49:53 +00:00