]> git.evergreen-ils.org Git - Evergreen.git/commit
Correct authority browsing for reals
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 30 Jan 2011 04:22:08 +0000 (04:22 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 30 Jan 2011 04:22:08 +0000 (04:22 +0000)
commite4594d161b2dedda7160922fae92dc635009ad93
tree556213d339d02bceef910448724392e284bf0fdf
parent0064786e48203d8e396713d4b2fcef11adc19393
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/trunk@19332 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
Open-ILS/xul/staff_client/server/cat/marcedit.js