From: justdave%bugzilla.org <> Date: Mon, 10 May 2004 09:28:31 +0000 (+0000) Subject: Bug 117297: Corrects a situation where email addresses got mailed to twice when addin... X-Git-Tag: bugzilla-2.16.6~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d2625c52fb63cf095a024c1f16fe8db2871de0f;p=thirdparty%2Fbugzilla.git Bug 117297: Corrects a situation where email addresses got mailed to twice when adding a user to the CC list if the same case isn't used as what's stored in the database for that user. Patch by Thomas Stromberg r= jouni, a=justdave --- diff --git a/processmail b/processmail index b98d0f0ee7..3c3da8b9d9 100755 --- a/processmail +++ b/processmail @@ -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}++; } }