From ae0cefd756d200fbd3f97c01ef991ccb129b4ede 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 Signed-off-by: Simon Pouchol --- 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 855a2f7..7da88f5 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 817abfe..de659c7 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -613,7 +613,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 91d8f7e..8646a9c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -82,7 +82,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 7e6239c..be8755c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -149,11 +149,11 @@ -- 2.1.4