From: cjwatson <> Date: Fri, 16 May 2003 05:40:31 +0000 (-0800) Subject: [project @ 2003-05-15 22:40:31 by cjwatson] X-Git-Tag: release/2.6.0~916 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=26c47c3e98c616d5afdfe21294036fb2b6b84232;p=debbugs.git [project @ 2003-05-15 22:40:31 by cjwatson] If there are multiple messages with the same message-id (e.g. sent to nnn@ and nnn-submitter@), consider all but the first as boring. --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 8f55221c..897f9d93 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -148,6 +148,8 @@ my $log=''; my $xmessage = 1; my $suppressnext = 0; +my $found_msgid = 0; +my %seen_msgid = (); my $thisheader = ''; my $this = ''; @@ -276,6 +278,7 @@ while(my $line = ) { $xmessage++ if ($normstate ne 'html'); $suppressnext = $normstate eq 'html'; + $found_msgid = 0; } $normstate = $newstate; @@ -298,6 +301,16 @@ while(my $line = ) { $this .= $_; } elsif ($normstate eq 'go') { s/^\030//; + if (!$suppressnext && !$found_msgid && + /^Message-ID: <(.*)>/i) { + my $msgid = $1; + $found_msgid = 1; + if ($seen_msgid{$msgid}) { + $suppressnext = 1; + } else { + $seen_msgid{$msgid} = 1; + } + } if (@mail) { push @mail, $_; } else { @@ -305,6 +318,16 @@ while(my $line = ) { } } elsif ($normstate eq 'go-nox') { next if !s/^X//; + if (!$suppressnext && !$found_msgid && + /^Message-ID: <(.*)>/i) { + my $msgid = $1; + $found_msgid = 1; + if ($seen_msgid{$msgid}) { + $suppressnext = 1; + } else { + $seen_msgid{$msgid} = 1; + } + } if (@mail) { push @mail, $_; } else {