Lines 137-144
Output.pm module.
Link Here
|
137 |
=cut |
137 |
=cut |
138 |
|
138 |
|
139 |
my $SEARCH_HISTORY_INSERT_SQL =<<EOQ; |
139 |
my $SEARCH_HISTORY_INSERT_SQL =<<EOQ; |
140 |
INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, limit_desc, limit_cgi, total, time ) |
140 |
INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, total, time ) |
141 |
VALUES ( ?, ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(?)) |
141 |
VALUES ( ?, ?, ?, ?, ?, FROM_UNIXTIME(?)) |
142 |
EOQ |
142 |
EOQ |
143 |
sub get_template_and_user { |
143 |
sub get_template_and_user { |
144 |
my $in = shift; |
144 |
my $in = shift; |
Lines 271-279
sub get_template_and_user {
Link Here
|
271 |
my @recentSearches = @{thaw($searchcookie) || []}; |
271 |
my @recentSearches = @{thaw($searchcookie) || []}; |
272 |
if (@recentSearches) { |
272 |
if (@recentSearches) { |
273 |
my $sth = $dbh->prepare($SEARCH_HISTORY_INSERT_SQL); |
273 |
my $sth = $dbh->prepare($SEARCH_HISTORY_INSERT_SQL); |
274 |
|
274 |
$sth->execute( $borrowernumber, |
275 |
$sth->execute( $borrowernumber, $in->{'query'}->cookie("CGISESSID"), $_->{'query_desc'}, $_->{'query_cgi'}, $_->{'limit_desc'}, $_->{'limit_cgi'}, $_->{'total'}, $_->{'time'}, ) |
275 |
$in->{'query'}->cookie("CGISESSID"), |
276 |
foreach @recentSearches; |
276 |
$_->{'query_desc'}, |
|
|
277 |
$_->{'query_cgi'}, |
278 |
$_->{'total'}, |
279 |
$_->{'time'}, |
280 |
) foreach @recentSearches; |
277 |
|
281 |
|
278 |
# And then, delete the cookie's content |
282 |
# And then, delete the cookie's content |
279 |
my $newsearchcookie = $in->{'query'}->cookie( |
283 |
my $newsearchcookie = $in->{'query'}->cookie( |
280 |
- |
|
|