From 02a049703de6055f09f44f89a5a821814696ce32 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 7 Oct 2010 03:58:28 -0700 Subject: Bug 602165: Change sql_interval to sql_date_math, in preparation for MS-SQL and SQLite support. --- Bugzilla/Auth/Persist/Cookie.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Auth') diff --git a/Bugzilla/Auth/Persist/Cookie.pm b/Bugzilla/Auth/Persist/Cookie.pm index 232212075..57fa9624e 100644 --- a/Bugzilla/Auth/Persist/Cookie.pm +++ b/Bugzilla/Auth/Persist/Cookie.pm @@ -69,8 +69,9 @@ sub persist_login { # Issuing a new cookie is a good time to clean up the old # cookies. - $dbh->do("DELETE FROM logincookies WHERE lastused < LOCALTIMESTAMP(0) - " - . $dbh->sql_interval(MAX_LOGINCOOKIE_AGE, 'DAY')); + $dbh->do("DELETE FROM logincookies WHERE lastused < " + . $dbh->sql_date_math('LOCALTIMESTAMP(0)', '-', + MAX_LOGINCOOKIE_AGE, 'DAY')); $dbh->bz_commit_transaction(); -- cgit v1.2.3-24-g4f1b