[Koha-bugs] [Bug 31333] Add the ability to limit purchase suggestions by patron category

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 5 20:52:15 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31333

--- Comment #42 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 141393
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141393&action=edit
Bug 31333: (QA follow-up) Simplify code

The new syspref is a deny-list. So not being part of the list means you
are allowed. This was not that clear reading the code, so this patch
tries to simplify the logic. Better handling on undef syspref value is
added as well to avoid useless warnings.

This patch does the following changes:
- Uses `any` instead of `grep`. This has the effect of just returning a
  boolean on the first match, instead of keep looping until de array

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list