From: Lebbeous Fogle-Weekley Date: Thu, 18 Jul 2013 18:52:03 +0000 (-0400) Subject: OPAC Browse: Fix browse interface's use of hits-per-page user setting X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ca2696640c78ebcfb03e22a62920dbe7fc548b52;p=working%2FEvergreen.git OPAC Browse: Fix browse interface's use of hits-per-page user setting The code that consults the user setting 'opac.hits_per_page' to set a default number of results to show in the browse interface was faulty. It failed to account for the opac.hits_per_page setting being configured for storage in a JSON-encoded string. My own earlier testing missed this because I had set opac.hits_per_page with a plain number in the database. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm index c31e42421d..81644e63e3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm @@ -333,7 +333,8 @@ sub load_browse { if (my $setting = first { $_->name eq 'opac.hits_per_page' } @{$self->ctx->{user}->settings}) { - $self->ctx->{opac_hits_per_page} = $setting->value; + $self->ctx->{opac_hits_per_page} = + int(OpenSRF::Utils::JSON->JSON2perl($setting->value)); } }