summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Auth
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r--Bugzilla/Auth/Persist/Cookie.pm5
1 files changed, 3 insertions, 2 deletions
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();