Lines 717-740
for (my $i=0;$i<@servers;$i++) {
Link Here
|
717 |
$query_cgi_history =~ s/;/&/g; |
717 |
$query_cgi_history =~ s/;/&/g; |
718 |
my $query_desc_history = join ", ", grep { defined $_ } $query_desc, $limit_desc; |
718 |
my $query_desc_history = join ", ", grep { defined $_ } $query_desc, $limit_desc; |
719 |
|
719 |
|
720 |
unless ( $borrowernumber ) { |
720 |
if ( $borrowernumber and $cgi->cookie("CGISESSID") ) { |
721 |
my $new_searches = C4::Search::History::add_to_session({ |
721 |
|
722 |
cgi => $cgi, |
722 |
# To the session (the user is logged in) |
|
|
723 |
C4::Search::History::add( |
724 |
{ |
725 |
userid => $borrowernumber, |
726 |
sessionid => $cgi->cookie("CGISESSID"), |
723 |
query_desc => $query_desc_history, |
727 |
query_desc => $query_desc_history, |
724 |
query_cgi => $query_cgi_history, |
728 |
query_cgi => $query_cgi_history, |
725 |
total => $total, |
729 |
total => $total, |
726 |
type => "biblio", |
730 |
type => "biblio", |
727 |
}); |
731 |
} |
|
|
732 |
); |
728 |
} else { |
733 |
} else { |
729 |
# To the session (the user is logged in) |
734 |
my $new_searches = C4::Search::History::add_to_session( |
730 |
C4::Search::History::add({ |
735 |
{ |
731 |
userid => $borrowernumber, |
736 |
cgi => $cgi, |
732 |
sessionid => $cgi->cookie("CGISESSID"), |
737 |
query_desc => $query_desc_history, |
733 |
query_desc => $query_desc_history, |
738 |
query_cgi => $query_cgi_history, |
734 |
query_cgi => $query_cgi_history, |
739 |
total => $total, |
735 |
total => $total, |
740 |
type => "biblio", |
736 |
type => "biblio", |
741 |
} |
737 |
}); |
742 |
); |
738 |
} |
743 |
} |
739 |
} |
744 |
} |
740 |
$template->param( EnableOpacSearchHistory => 1 ); |
745 |
$template->param( EnableOpacSearchHistory => 1 ); |
741 |
- |
|
|