Bug 5630, follow-up

Fixes chris comment 28, that was a consequence of Marcel comment 27
Recent error
[Thu Sep 01 14:22:45 2011] [error] [client 192.87.126.61] [Thu Sep  1 14:22:45
2011] opac-MARCdetail.pl: DBD::mysql::st execute failed: Unknown column
'limit_desc' in 'field list' at /usr/share/koha/testclone/C4/Auth.pm line 276.
Seems to come from this commit 9a3950f673 (5630
CAS Improvements)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Paul Poulain 2011-09-02 18:12:10 +02:00 committed by Chris Cormack
parent 74c7c4e3a5
commit 1c0702c76e

View file

@ -137,8 +137,8 @@ Output.pm module.
=cut
my $SEARCH_HISTORY_INSERT_SQL =<<EOQ;
INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, limit_desc, limit_cgi, total, time )
VALUES ( ?, ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(?))
INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, total, time )
VALUES ( ?, ?, ?, ?, ?, FROM_UNIXTIME(?))
EOQ
sub get_template_and_user {
my $in = shift;
@ -271,9 +271,13 @@ sub get_template_and_user {
my @recentSearches = @{thaw($searchcookie) || []};
if (@recentSearches) {
my $sth = $dbh->prepare($SEARCH_HISTORY_INSERT_SQL);
$sth->execute( $borrowernumber, $in->{'query'}->cookie("CGISESSID"), $_->{'query_desc'}, $_->{'query_cgi'}, $_->{'limit_desc'}, $_->{'limit_cgi'}, $_->{'total'}, $_->{'time'}, )
foreach @recentSearches;
$sth->execute( $borrowernumber,
$in->{'query'}->cookie("CGISESSID"),
$_->{'query_desc'},
$_->{'query_cgi'},
$_->{'total'},
$_->{'time'},
) foreach @recentSearches;
# And then, delete the cookie's content
my $newsearchcookie = $in->{'query'}->cookie(