From c609afdd78ff6f41d1c127e22629ff3136880495 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Thu, 9 Sep 2004 06:29:07 +0000 Subject: Patch for bug 257303: convert lastused field in logincookies from timestamp to datetime; patch by Tomas Kopal ; r=vladd, a=justdave. --- Bugzilla/Auth/Login/WWW/CGI.pm | 3 ++- Bugzilla/Auth/Login/WWW/CGI/Cookie.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Auth/Login/WWW/CGI.pm b/Bugzilla/Auth/Login/WWW/CGI.pm index 3b90ec6ad..6b1761959 100644 --- a/Bugzilla/Auth/Login/WWW/CGI.pm +++ b/Bugzilla/Auth/Login/WWW/CGI.pm @@ -68,7 +68,8 @@ sub login { trick_taint($ipaddr); my $dbh = Bugzilla->dbh; - $dbh->do("INSERT INTO logincookies (userid, ipaddr) VALUES (?, ?)", + $dbh->do("INSERT INTO logincookies (userid, ipaddr, lastused) + VALUES (?, ?, NOW())", undef, $userid, $ipaddr); my $logincookie = $dbh->selectrow_array("SELECT LAST_INSERT_ID()"); diff --git a/Bugzilla/Auth/Login/WWW/CGI/Cookie.pm b/Bugzilla/Auth/Login/WWW/CGI/Cookie.pm index 84f2b27a8..a8ba4f777 100644 --- a/Bugzilla/Auth/Login/WWW/CGI/Cookie.pm +++ b/Bugzilla/Auth/Login/WWW/CGI/Cookie.pm @@ -76,7 +76,7 @@ sub authenticate { if ($userid) { # If we logged in successfully, then update the lastused time on the # login cookie - $dbh->do("UPDATE logincookies SET lastused=NULL WHERE cookie=?", + $dbh->do("UPDATE logincookies SET lastused=NOW() WHERE cookie=?", undef, $login_cookie); -- cgit v1.2.3-24-g4f1b