From 0f8f0b2b6053f3c6a15cae927b55ba4c45a2910e Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 20 Oct 2017 00:25:55 +0000 Subject: [PATCH] Bug 14715: [FOLLOW-UP] Removing 'all' option, fixing QA tools issues --- C4/Search.pm | 4 ++-- catalogue/search.pl | 3 +-- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 1 - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 10 +++++----- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 1a9c78b..979b4d0 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -446,7 +446,7 @@ sub getRecords { # loop through the results $results_hash->{'hits'} = $size; my $times; - if ( $results_per_page != 'all' && ($offset + $results_per_page <= $size) ) { + if ( $offset + $results_per_page <= $size ) { $times = $offset + $results_per_page; } else { @@ -1888,7 +1888,7 @@ sub searchResults { # handle which records to actually retrieve my $times; - if ( $hits && $results_per_page != 'all' && ($offset + $results_per_page <= $hits) ) { + if ( $hits && ($offset + $results_per_page <= $hits) ) { $times = $offset + $results_per_page; } else { diff --git a/catalogue/search.pl b/catalogue/search.pl index 9cda594..70ee87f 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -544,7 +544,6 @@ for (my $i=0;$i<@servers;$i++) { my $server = $servers[$i]; if ($server =~/biblioserver/) { # this is the local bibliographic server $hits = $results_hashref->{$server}->{"hits"}; - $results_per_page = $hits if $results_per_page == 'all'; my $page = $cgi->param('page') || 0; my @newresults = searchResults('intranet', $query_desc, $hits, $results_per_page, $offset, $scan, $results_hashref->{$server}->{"RECORDS"}); @@ -608,7 +607,7 @@ for (my $i=0;$i<@servers;$i++) { if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); } - $template->param(results_per_page => $results_per_page == $hits ? 'all' : $results_per_page); + $template->param(results_per_page => $results_per_page); # must define a value for size if not present in DB # in order to avoid problems generated by the default size value in TT foreach my $line (@newresults) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 7647d53..ab9831b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -371,7 +371,6 @@ var holdForPatron = function () { [% IF results_per_page == '60' %][% ELSE %][% END %] [% IF results_per_page == '80' %][% ELSE %][% END %] [% IF results_per_page == '100' %][% ELSE %][% END %] - [% IF results_per_page == 'all' %][% ELSE %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index ba743ff..885bb78 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -148,11 +148,11 @@ -- 2.1.4