X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Flib%2FMAPSLog.pm;h=b0b2c8516e18420cac0fef10458341bb442bb2fa;hb=bf953a20fadc765e8018701bec01b7a5309b0e00;hp=33ac5c80ba30233af80a5834e906406a22695901;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git diff --git a/maps/lib/MAPSLog.pm b/maps/lib/MAPSLog.pm index 33ac5c8..b0b2c85 100644 --- a/maps/lib/MAPSLog.pm +++ b/maps/lib/MAPSLog.pm @@ -24,6 +24,7 @@ use MAPS; use DateUtils; use Utils; +our @ISA = qw(Exporter); our @EXPORT = qw ( Debug Error @@ -34,12 +35,12 @@ our @EXPORT = qw ( ); our @Types = ( + 'nulllist', 'returned', 'whitelist', 'blacklist', 'registered', 'mailloop', - 'nulllist' ); sub nbr_msgs($) { @@ -68,8 +69,9 @@ sub GetStats(%) { for (@Types) { my $condition = "type=\'$_\' and (timestamp > \'$sod\' and timestamp < \'$eod\')"; - $stats{$_} = MAPS::CountLog( + $stats{$_} = MAPS::CountLogDistinct( userid => $params{userid}, + column => 'sender', additional => $condition, ); } # for @@ -104,6 +106,8 @@ sub Debug(%) { sub Error(%) { my (%params) = @_; + CheckParms(['userid', 'message'], \%params); + return Logmsg( userid => $params{userid}, type => 'error',