Bugzilla – Attachment 43129 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478: Remove empty limit parameter
Bug-12478-Remove-empty-limit-parameter.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2015-10-05 13:42:12 UTC
(
hide
)
Description:
Bug 12478: Remove empty limit parameter
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-05 13:42:12 UTC
Size:
1.49 KB
patch
obsolete
>From 577b948515956f9df75647f3c933315089b8c775 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Oct 2015 11:34:54 +0100 >Subject: [PATCH] Bug 12478: Remove empty limit parameter > >If no limit are passed, the url will contain '&limit=' anyway. >It is not necessary and can be avoided easily > >Test plan: >1/ Search for a term in your catalogue >2/ Hover over a link in the facet area >3/ The link is >cgi-bin/koha/opac-search.pl?idx=kw&q=your_term&limit=&limit=[...] > >With this patch, the empty limit parameter does not appear. >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 09d65a6..90c6d32 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -223,8 +223,9 @@ sub build_query_compat { > my $simple_query = $operands->[0] if @$operands == 1; > my $query_desc = $simple_query; > my $limit = $self->_join_queries( $self->_convert_index_strings(@$limits)); >- my $limit_cgi = >- '&limit=' . join( '&limit=', map { uri_escape_utf8($_) } @$orig_limits ); >+ my $limit_cgi = @$orig_limits >+ ? '&limit=' . join( '&limit=', map { uri_escape_utf8($_) } @$orig_limits ) >+ : ''; > my $limit_desc = "$limit" if $limit; > return ( > undef, $query, $simple_query, $query_cgi, $query_desc, >-- >2.1.0
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 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292