LP#1657282: fix redirect of one-hit metarecord searches
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 17 Jan 2017 21:58:39 +0000 (16:58 -0500)
committerKathy Lussier <klussier@masslnc.org>
Wed, 18 Jan 2017 19:31:17 +0000 (14:31 -0500)
commit5da54ca031ee81e348c68e6a96d239838de33bee
tree9d55c890072173c3a19da1221b4eedf0268e9fb8
parent6badeb7a7ce8ab4172808343b1e88e068d1fc524
LP#1657282: fix redirect of one-hit metarecord searches

This patches fixes a bug where, when performing a metarecord
("Group Formats and Editions") search, one-hit result sets
get redirected to a "/eg/opac/record/0.0..." page, which
results in a "Bad Request" error being shown to the user.

To test:

[1] Perform a metarecord search that would result in exactly
    one metarecord search. Observe that the browser displays
    a "Bad Request" error page.
[2] Apply the patch and perform step 1 again. This time, the
    search should succeed. Note that if the metarecord contains
    more than one component, a results page with one grouped
    hit is displayed; if the metarecord has exactly one component,
    that bib's record page is displayed.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm