X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=maps%2Fbin%2Fadd2nulllist.cgi;h=03815fdc4e3525cffc402312c97842675b7e6ac3;hb=64cb05c445d480f29d266e70db6eb1d021d34456;hp=7fcf668e123b69b67f59bc1780f3a1e5bd3724e2;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/maps/bin/add2nulllist.cgi b/maps/bin/add2nulllist.cgi index 7fcf668..03815fd 100755 --- a/maps/bin/add2nulllist.cgi +++ b/maps/bin/add2nulllist.cgi @@ -36,12 +36,13 @@ sub Add2List { my $nextseq = MAPSDB::GetNextSequenceNo $userid, $type; while () { - my $pattern = param "pattern$nextseq"; - my $domain = param "domain$nextseq"; - my $comment = param "comment$nextseq"; + my $pattern = param "pattern$nextseq"; + my $domain = param "domain$nextseq"; + my $comment = param "comment$nextseq"; + my $hit_count = param "hit_count$nextseq"; last if ((!defined $pattern || $pattern eq '') && - (!defined $domain || $domain eq '')); + (!defined $domain || $domain eq '')); $sender = lc "$pattern\@$domain"; @@ -50,10 +51,12 @@ sub Add2List { if ($status != 0) { print br {-class => 'error'}, "The email address $sender is already on ${Userid}'s $type list"; } else { - Add2Nulllist $sender, $userid, $comment; + $hit_count ||= CountMsg $sender; + + Add2Nulllist $sender, $userid, $comment, $hit_count; print br "The email address, $sender, has been added to ${Userid}'s $type list"; - + # Now remove this entry from the other lists (if present) foreach my $otherlist ('white', 'black') { my $sth = FindList $otherlist, $sender; @@ -100,7 +103,7 @@ print start_form { print '

', hidden ({-name => 'type', - -default => $type}), + -default => $type}), submit ({-name => 'action', -value => 'Add New Entry'}), '
';