]> git.koha-community.org Git - koha.git/commit
Bug 17318: Make C4::Matcher::_get_match_keys handle 'norms' param
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 19 Sep 2016 15:25:31 +0000 (12:25 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 16:16:34 +0000 (16:16 +0000)
commit4579f1ad906b28a78c0ef7a1669b0a08138745d1
treeb6428015644634938ee9305012ecb3ca5eda11e3
parenta0af2d7d5ceb28848488c4f66e486f646341eedf
Bug 17318: Make C4::Matcher::_get_match_keys handle 'norms' param

The current implementation doesn't care about that parameter, and applies
a default normalization rule that seems counter-productive (in general) for
its aleged purpose.

This patch makes it handle the following values for 'norms':

    - upper_case
    - lower_case
    - remove_spaces
    - legacy_default
    - none

They make it call the relevant Koha::Utils::Normalize routines. 'legacy_default'
is used only for backwards compatibility, but could be removed if there's consensus.

To test:
- Run:
  $ prove t/Matcher.t
=> FAIL: most _get_match_keys tests fail
- Apply the patch
- Run:
  $ prove t/Matcher.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: FIT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Matcher.pm