Bug 10807: (follow-up) use 24-hour time when storing search times to session
This ensures that if an anonymous session is converted to a logged-in session, that search history times from the anonymous session get stored corectly. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
7f595f8cb8
commit
18cce456d9
|
|
@ -260,7 +260,6 @@ sub get_template_and_user {
|
|||
my @recentSearches = C4::Search::History::get_from_session({ cgi => $in->{'query'} });
|
||||
if (@recentSearches) {
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $query = q{
|
||||
INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, type, total, time )
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ sub add_to_session {
|
|||
query_cgi => $query_cgi,
|
||||
total => "$total",
|
||||
type => $type,
|
||||
time => output_pref( { dt => dt_from_string(), dateformat => 'iso' } ),
|
||||
time => output_pref( { dt => dt_from_string(), dateformat => 'iso', timeformat => '24hr' } ),
|
||||
};
|
||||
|
||||
shift @recent_searches if ( @recent_searches > 15 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue