From 1ba5fb3d2fa7e8c106bf30cd1b4acc6df20cc158 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 5d3dbb2..1b84751 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 e70dac9..e45b2e4 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 d161697..f5e8851 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -87,7 +87,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 d6b199c..9a007b0 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.1.4