LP#1562153: fix case where changing sort order to relevance can fail user/gmcharlt/lp1562153_sorting_must_remain_relevant
authorGalen Charlton <gmc@esilibrary.com>
Fri, 25 Mar 2016 20:46:24 +0000 (16:46 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 25 Mar 2016 20:46:24 +0000 (16:46 -0400)
commit3124624553273fe5a3aa4a9027d0923779b02792
tree929223dacad1659cbffb72cceed97e489954dfea
parentbca149204c8dadf0808e3bc1acb648e4a5036684
LP#1562153: fix case where changing sort order to relevance can fail

This patch fixes a cause where sending a 'sort' CGI parameter
with the empty string as value (which specifies relevance sorting)
fails to override a previously-set sort order.

To test:

[1] Do a public catalog search starting from the advanced search form,
    e.g., keyword = "cats"
[2] Change the sort order to (say) Title A-Z from the results page.
[3] Note that the query string changes to "sort(titlesort) cats" and
    that the results are re-sorted
[4] Attempt to change the sort order to relevance.
[5] This time, the sort order does not change ... and it should have.
[6] Apply the patch and repeat steps 1-5. This time, the sort order
    should be successfully changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm