]> git.evergreen-ils.org Git - Evergreen.git/commit
Correct authority browsing for reals
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 30 Jan 2011 05:19:15 +0000 (05:19 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 30 Jan 2011 05:19:15 +0000 (05:19 +0000)
commitf9a7766019f98ceb41099e89cd1e70230b6b22a3
tree0502f97b7fef499e1608137cfc9a8a9f0fce36aa
parent6e47810d891306a0a628d1d45c0764c0597fce6d
Correct authority browsing for reals

First, restore the >= enable before and after ranges in
authority_tag_sf_browse(), after I mistakenly removed it in
r19131; the second storage request for $after does not
stomp on the prior $before results, it simply gets pushed
onto the carefully constructed list of $before results,
ensuring that our target is in the middle of page 0.

Second, we're treating all of the "tag" members in the
method registration as list references now (for the purpose
of searching against 4xx/5xx in the .refs. variants), but
that was blowing up when we registered just a single tag as
a string and tried to treat the scalar as a list reference.
I could have checked to see if what we had incoming was a
reference and dance accordingly, but opted to just define
all single-tag entries as single-element arrays instead.
Applied the same to startwith.

Finally, in r19331 I had used chop() to ensure that an
exact match for startwith would be returned as element 1 on
page 0, instead of appearing as the last element of page -1.
I had said that the right way to do this would be to naco_normalize()
the value to match the normalized afr.value, and so this is what
I have done. Rather than torturously using O:A:Storage:FTS to get
at the naco_normalize() definition, I moved the function into its
own Utils package and adjusted its usage accordingly through the
affected code. One step closer to single-sourcing the function
in the database, as well?

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19335 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/perlmods/OpenILS/Application/Storage/FTS.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm
Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Open-ILS/src/perlmods/OpenILS/Utils/Normalize.pm [new file with mode: 0644]
Open-ILS/tests/naco_normalize.t