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 <lebbeous@esilibrary.com>
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));
}
}