From: Andrew DeFaria Date: Sun, 18 Jul 2021 04:18:19 +0000 (-0700) Subject: Fixed bug with counting messages X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;h=f6c2a9114dff9bf8882180bbf49ed6b3e3533a91;p=clearscm.git Fixed bug with counting messages --- diff --git a/maps/bin/processaction.cgi b/maps/bin/processaction.cgi index 7422b74..229a2c3 100755 --- a/maps/bin/processaction.cgi +++ b/maps/bin/processaction.cgi @@ -102,7 +102,10 @@ sub PrintInputLine ($$$$$) { ($pattern, $domain) = split /\@/, $email; } # if - $hit_count = CountMsg($email); + $hit_count = CountEmail( + userid => $userid, + additional => "sender like '%$email%'", + ); } # if print Tr [ diff --git a/maps/lib/MAPS.pm b/maps/lib/MAPS.pm index 8a764cf..618fb67 100644 --- a/maps/lib/MAPS.pm +++ b/maps/lib/MAPS.pm @@ -291,7 +291,7 @@ sub AddList(%) { $rec{hit_count} //= $db->count( 'email', - "userid = '$rec{userid}' and sender like '$rec{sender}%'" + "userid = '$rec{userid}' and sender like '%$rec{sender}%'" ); ($rec{pattern}, $rec{domain}) = split /\@/, delete $rec{sender};