Bugzilla – Attachment 56611 Details for
Bug 14715
Results per page setting for catalog search in staff client and OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14715: syspref for results per page options
Bug-14715-syspref-for-results-per-page-options.patch (text/plain), 1.62 KB, created by
Aleisha Amohia
on 2016-10-18 00:34:32 UTC
(
hide
)
Description:
Bug 14715: syspref for results per page options
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-10-18 00:34:32 UTC
Size:
1.62 KB
patch
obsolete
>From 65f3acb0e02df87291020d94c2da71cc2cca9253 Mon Sep 17 00:00:00 2001 >From: Martin Stenberg <martin@xinxidi.net> >Date: Mon, 21 Sep 2015 18:45:52 +0200 >Subject: [PATCH] Bug 14715: syspref for results per page options > >Remove the "all" option. > >Add syspref [OPAC]numSearchResultsPerPage for specifying options for numbers of >results per page including [OPAC]numSearchResults. >--- > catalogue/search.pl | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 57924c3..4ea81f0 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -150,7 +150,7 @@ use C4::Members qw(GetMember); > use URI::Escape; > use POSIX qw(ceil floor); > use C4::Search::History; >- >+use String::Random; > use Koha::LibraryCategories; > use Koha::Virtualshelves; > use Koha::SearchEngine::Search; >@@ -451,6 +451,13 @@ for (my $ii = 0; $ii < @operands; ++$ii) > # Params that can only have one value > my $scan = $params->{'scan'}; > my $count = C4::Context->preference('numSearchResults') || 20; >+my @results_per_page_options = grep /^\d+$/, >+ map {s/\s+//g;$_;} >+ split /,/, C4::Context->preference('numSearchResultsPerPage'); >+push(@results_per_page_options, $count); >+@results_per_page_options = do { my %seen; grep { !$seen{$_}++ } @results_per_page_options }; >+@results_per_page_options = sort {$a <=> $b} @results_per_page_options; >+ > my $results_per_page = $params->{'results_per_page'} || $cgi->cookie("results_per_page") || $count; > my $page = $cgi->param('page') || 1; > my $offset = $results_per_page != 'all' ? ($page-1)*$results_per_page : 0; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14715
:
41949
|
42003
|
42742
|
42743
|
56002
|
56003
|
56004
|
56005
|
56575
|
56576
|
56577
|
56610
|
56611
|
56612
|
57870
|
61721
|
64250
|
67912
|
67913
|
68000
|
68001
|
68305
|
68327
|
75938
|
75939
|
75940
|
75941
|
78230
|
78298
|
78299
|
78300
|
78301
|
78302
|
79796
|
79797
|
79988
|
81203
|
88097
|
88102
|
88103
|
88104
|
88105
|
88106
|
88107
|
88108
|
88109
|
88126
|
88195
|
88831
|
88832
|
88833
|
88834
|
88835
|
88836
|
88837
|
88838
|
88839
|
95038
|
97004
|
98365
|
99607
|
99677
|
99684
|
99685
|
101775
|
101776
|
101777
|
101778