From 089da67f328bd550edcfb7eec157469fa2ee9340 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 20 Oct 2017 00:25:55 +0000 Subject: [PATCH] Bug 14715: [QA Follow up] Removing 'all' option, fixing QA tools issues Signed-off-by: Simon Pouchol Signed-off-by: Cab Vinton Signed-off-by: Liz Rea --- C4/Search.pm | 4 ++-- catalogue/search.pl | 2 +- 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(+), 9 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 5d3dbb26e5..1b84751df5 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 { @@ -1898,7 +1898,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 e70dac9c51..e45b2e43a9 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -627,7 +627,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 2e03d440c5..43b75fa840 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -86,7 +86,6 @@ [% 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 1db0a053bf..edd66ffa48 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -167,11 +167,11 @@ -- 2.11.0