Bugzilla – Attachment 78650 Details for
Bug 12460
Search history: Combine to start a new search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12460: Fix query combination for anonymous users
Bug-12460-Fix-query-combination-for-anonymous-user.patch (text/plain), 1.18 KB, created by
Julian Maurice
on 2018-09-14 12:38:31 UTC
(
hide
)
Description:
Bug 12460: Fix query combination for anonymous users
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-09-14 12:38:31 UTC
Size:
1.18 KB
patch
obsolete
>From 09c696040490ace7e6b3f4ec91c7ec34ca7cdb67 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 14 Sep 2018 14:36:31 +0200 >Subject: [PATCH] Bug 12460: Fix query combination for anonymous users > >--- > C4/Search/History.pm | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > >diff --git a/C4/Search/History.pm b/C4/Search/History.pm >index 277d81b2b6..86041e5bf1 100644 >--- a/C4/Search/History.pm >+++ b/C4/Search/History.pm >@@ -231,11 +231,17 @@ sub set_to_session { > sub get_query { > my ($id, $borrowernumber, $lang, $default) = @_; > >- my $searches = C4::Search::History::get({ >- type => 'biblio', >- userid => $borrowernumber, >- id => $id, >- }); >+ my $searches; >+ if ($borrowernumber) { >+ $searches = C4::Search::History::get({ >+ type => 'biblio', >+ userid => $borrowernumber, >+ id => $id, >+ }); >+ } else { >+ my @searches = C4::Search::History::get_from_session({ cgi => new CGI }); >+ $searches = [ grep { $_->{id} eq $id } @searches ]; >+ } > > if (ref $searches eq 'ARRAY' && scalar @$searches > 0) { > my $search = $searches->[0]; >-- >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 12460
:
29102
|
35699
|
41782
|
42450
|
59384
|
72091
|
72092
|
78648
|
78649
| 78650