Fixed hit_count to contain the actual hit count when adding or modifying records
authorAndrew DeFaria <Andrew.DeFaria@Broadcom.com>
Thu, 20 Oct 2016 01:19:18 +0000 (18:19 -0700)
committerAndrew DeFaria <Andrew.DeFaria@Broadcom.com>
Thu, 20 Oct 2016 01:19:18 +0000 (18:19 -0700)
maps/bin/add2nulllist.cgi
maps/bin/processaction.cgi

index 003dbd5..03815fd 100755 (executable)
@@ -51,6 +51,8 @@ sub Add2List {
     if ($status != 0) {
       print br {-class => 'error'}, "The email address $sender is already on ${Userid}'s $type list";
     } else {
+      $hit_count ||= CountMsg $sender;
+
       Add2Nulllist $sender, $userid, $comment, $hit_count;
 
       print br "The email address, $sender, has been added to ${Userid}'s $type list";
index 539572e..493020b 100755 (executable)
@@ -93,7 +93,7 @@ sub PrintInputLine ($$$$$) {
       ($pattern, $domain) = split /\@/, $email;
     } # if
 
-    $hit_count = param "hit_count$email_nbr";
+    $hit_count = CountMsg $email;
   } # if
 
   print Tr [