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 commit9a3950f673(5630 CAS Improvements) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> (cherry picked from commit1c0702c76e) Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
adb6d020ac
commit
cdbc9358d0
14
C4/Auth.pm
14
C4/Auth.pm
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue