]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 117297: Corrects a situation where email addresses got mailed to twice when addin...
authorjustdave%bugzilla.org <>
Mon, 10 May 2004 09:28:31 +0000 (09:28 +0000)
committerjustdave%bugzilla.org <>
Mon, 10 May 2004 09:28:31 +0000 (09:28 +0000)
Patch by Thomas Stromberg <thomas+mozilla@stromberg.org>
r= jouni, a=justdave

processmail

index b98d0f0ee78a4308f166472f161b52db9a8eae12..3c3da8b9d90df19a57b445f7ccdf623e8ef2c402 100755 (executable)
@@ -267,10 +267,14 @@ sub ProcessOneBug {
     # only need one entry per person
     my @allEmail = ();
     my %AlreadySeen = ();
+    my $checkperson = "";
     foreach my $person (@emailList) {
-        if ( !($AlreadySeen{$person}) ) {
+       # don't modify the original so it sends out with the right case
+       # based on who came first.
+       $checkperson = lc($person);
+        if ( !($AlreadySeen{$checkperson}) ) {
             push(@allEmail,$person);
-            $AlreadySeen{$person}++;
+            $AlreadySeen{$checkperson}++;
         }
     }
 
@@ -362,7 +366,7 @@ sub filterExcludeList ($$) {
         foreach my $included (@allEmail) {
 
             # match found, so we remove the entry
-            if ($included eq $excluded) {
+            if (lc($included) eq lc($excluded)) {
                 pop(@result);
                 last;
             }
@@ -370,10 +374,13 @@ sub filterExcludeList ($$) {
     }
 
     # only need one entry per person
+    my $checkperson = "";
+
     foreach my $person (@result) {
-        if ( !($alreadySeen{$person}) ) {
+       $checkperson = lc($person);
+        if ( !($alreadySeen{$checkperson}) ) {
             push(@uniqueResult,$person);
-            $alreadySeen{$person}++;
+            $alreadySeen{$checkperson}++;
         }
     }