Bugzilla – Attachment 121498 Details for
Bug 27113
Elasticsearch: Autocomplete in search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27113: (follow-up) Correction with Session
Bug-27113-follow-up-Correction-with-Session.patch (text/plain), 1.86 KB, created by
Ivan Dziuba
on 2021-05-28 20:49:07 UTC
(
hide
)
Description:
Bug 27113: (follow-up) Correction with Session
Filename:
MIME Type:
Creator:
Ivan Dziuba
Created:
2021-05-28 20:49:07 UTC
Size:
1.86 KB
patch
obsolete
>From f3b8de847fdd2e86d909af8f5ffa369415dc7026 Mon Sep 17 00:00:00 2001 >From: Ivan Dziuba <ivan.dziuba@inlibro.com> >Date: Fri, 28 May 2021 16:48:17 -0400 >Subject: [PATCH] Bug 27113: (follow-up) Correction with Session > >I have changed CGI::Session->new() from CGI::Session->load() for use session. This condition - 'CGI::Session->load() or die CGI::Session->errstr();' > >I am not sure that was good idea to use 'die' in this condition...What do you think? >Thanks! >--- > api/elasticsearch/elasticsearch.pl | 2 +- > opac/svc/elasticsearch/opac-elasticsearch.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/api/elasticsearch/elasticsearch.pl b/api/elasticsearch/elasticsearch.pl >index 09a79bc045..718af730f4 100755 >--- a/api/elasticsearch/elasticsearch.pl >+++ b/api/elasticsearch/elasticsearch.pl >@@ -11,7 +11,7 @@ use Koha::SearchEngine::Elasticsearch::Browse; > > my $browser = Koha::SearchEngine::Elasticsearch::Browse->new( { index => 'biblios' } ); > my $cgi = CGI->new; >-my $session = CGI::Session->new(); >+my $session = CGI::Session->load() or die CGI::Session->errstr(); > > $session->param(-name=>'analyzer', -value=>"autocomplete"); > $session->param(-name=>'prefix', -value=>$cgi->multi_param("prefix")); >diff --git a/opac/svc/elasticsearch/opac-elasticsearch.pl b/opac/svc/elasticsearch/opac-elasticsearch.pl >index 8934cd50c6..812b458855 100755 >--- a/opac/svc/elasticsearch/opac-elasticsearch.pl >+++ b/opac/svc/elasticsearch/opac-elasticsearch.pl >@@ -11,7 +11,7 @@ use Koha::SearchEngine::Elasticsearch::Browse; > > my $browser = Koha::SearchEngine::Elasticsearch::Browse->new( { index => 'biblios' } ); > my $cgi = CGI->new; >-my $session = CGI::Session->new(); >+my $session = CGI::Session->load() or die CGI::Session->errstr(); > > $session->param(-name=>'analyzer', -value=>"autocomplete"); > $session->param(-name=>'prefix', -value=>$cgi->multi_param("prefix")); >-- >2.17.1
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 27113
:
114168
|
114169
|
114945
|
115117
|
116293
|
119979
|
120028
|
120029
|
120084
|
120088
|
120109
|
120140
|
120141
|
120806
|
121497
|
121498
|
121555
|
121556
|
121557
|
121558
|
131207
|
131208
|
131209
|
131210
|
131211
|
132360
|
132361
|
132362
|
132363
|
132364
|
132808
|
132945
|
132946
|
133042
|
133045
|
133407
|
133409
|
133410
|
136312
|
136456
|
136457
|
136464
|
136465
|
136653
|
136657
|
136658
|
136659
|
136660
|
137436
|
137437
|
137438
|
137439
|
137780
|
137781
|
137782
|
137783
|
139624
|
141466
|
145167
|
146015
|
159769
|
159770
|
159771
|
159772
|
159773
|
159774
|
159775
|
160134
|
160135
|
160136
|
160137
|
160138
|
160139
|
160140
|
160141
|
160142
|
161076
|
161077
|
163826
|
165895
|
165896
|
165897
|
165898
|
165899
|
165900
|
165901
|
165902
|
165903
|
165904
|
165913
|
165922
|
177537
|
177538
|
177539
|
177540
|
177541
|
177542
|
177543
|
177544
|
177545
|
177546
|
177547
|
177548
|
177657
|
178822
|
178823
|
178824
|
178825
|
178826
|
178827
|
178828
|
178829
|
178830
|
178831
|
178832
|
178833