X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=maps%2Flib%2FMAPS.pm;h=3e0b066154e82ec121a63eeb7b97449eae421bb9;hb=2911826fd83a57b69c528e4daaf8df30c00b6d2b;hp=618fb67ed0ca9ecd5cbffc3fcdfb6e417c7442d0;hpb=f6c2a9114dff9bf8882180bbf49ed6b3e3533a91;p=clearscm.git diff --git a/maps/lib/MAPS.pm b/maps/lib/MAPS.pm index 618fb67..3e0b066 100644 --- a/maps/lib/MAPS.pm +++ b/maps/lib/MAPS.pm @@ -403,6 +403,8 @@ sub CheckEmail(;$$) { if ($username) { if ($username =~ /(.*)\@(.*)/) { return lc "$1\@$2"; + } else { + return lc "$username\@"; } # if } elsif ($domain) { if ($domain =~ /(.*)\@(.*)/) { @@ -458,7 +460,9 @@ sub CheckOnList ($$;$) { ? "$email_on_file\@" : $email_on_file; if ($sender and $sender =~ /$search_for/i) { - $rule = "Matching rule: ($listtype:$rec->{sequence}) \"$email_on_file\""; + my $comment = $rec->{comment} ? " - $rec->{comment}" : ''; + + $rule = "Matching rule: ($listtype:$rec->{sequence}) \"$email_on_file$comment\""; $rule .= " - $rec->{comment}" if $rec->{comment}; $status = 1; @@ -625,7 +629,7 @@ sub CountLog(%) { my $condition = "userid='$userid'"; $condition .= " and $additional_condition" if $additional_condition; - return $db->count_distinct('log', 'sender', $condition); + return $db->count('log', $condition); } # CountLog sub Decrypt ($$) {