From 983213261f42cfb514586f4a72f5f06bcf025409 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Sat, 17 Jul 2021 16:17:54 -0700 Subject: [PATCH] Fixed bug where AddLog was not properly adding timestamp --- maps/bin/MAPSDB.sql | 2 +- maps/lib/MAPS.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/bin/MAPSDB.sql b/maps/bin/MAPSDB.sql index 1af464b..211334b 100644 --- a/maps/bin/MAPSDB.sql +++ b/maps/bin/MAPSDB.sql @@ -71,7 +71,7 @@ create table list ( -- for the null and black lists where one might want to insure that -- a particular domain (e.g. @talentburst.com) will never come off -- of the nulllist. --- retention varchar (40), + retention varchar (40), key user_index (userid), key user_listtype (userid, type), unique (userid, type, sequence), diff --git a/maps/lib/MAPS.pm b/maps/lib/MAPS.pm index 0405483..c2069c1 100644 --- a/maps/lib/MAPS.pm +++ b/maps/lib/MAPS.pm @@ -306,7 +306,7 @@ sub AddList(%) { sub AddLog(%) { my (%params) = @_; - my $timestamp = UnixDatetime2SQLDatetime(scalar(localtime)); + $params{timestamp} = UnixDatetime2SQLDatetime(scalar(localtime)); return $db->add('log', %params); } # AddLog -- 2.17.1