Lines 231-241
sub set_to_session {
Link Here
|
231 |
sub get_query { |
231 |
sub get_query { |
232 |
my ($id, $borrowernumber, $lang, $default) = @_; |
232 |
my ($id, $borrowernumber, $lang, $default) = @_; |
233 |
|
233 |
|
234 |
my $searches = C4::Search::History::get({ |
234 |
my $searches; |
235 |
type => 'biblio', |
235 |
if ($borrowernumber) { |
236 |
userid => $borrowernumber, |
236 |
$searches = C4::Search::History::get({ |
237 |
id => $id, |
237 |
type => 'biblio', |
238 |
}); |
238 |
userid => $borrowernumber, |
|
|
239 |
id => $id, |
240 |
}); |
241 |
} else { |
242 |
my @searches = C4::Search::History::get_from_session({ cgi => new CGI }); |
243 |
$searches = [ grep { $_->{id} eq $id } @searches ]; |
244 |
} |
239 |
|
245 |
|
240 |
if (ref $searches eq 'ARRAY' && scalar @$searches > 0) { |
246 |
if (ref $searches eq 'ARRAY' && scalar @$searches > 0) { |
241 |
my $search = $searches->[0]; |
247 |
my $search = $searches->[0]; |
242 |
- |
|
|