From 18cce456d9685fcf16936a18936873c142cb8aab Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 5 May 2014 02:55:41 +0000 Subject: [PATCH] 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 --- C4/Auth.pm | 1 - C4/Search/History.pm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 006a990826..24e0bf1d1a 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -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 (?, ?, ?, ?, ?, ?, ?) diff --git a/C4/Search/History.pm b/C4/Search/History.pm index e24a65ac00..d82d14ebab 100644 --- a/C4/Search/History.pm +++ b/C4/Search/History.pm @@ -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 ); -- 2.39.2