From ca2696640c78ebcfb03e22a62920dbe7fc548b52 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 18 Jul 2013 14:52:03 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); } } -- 2.11.0