From: don <> Date: Thu, 28 Jul 2005 05:51:25 +0000 (-0800) Subject: [project @ 2005-07-27 22:51:25 by don] X-Git-Tag: release/2.6.0~678 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5b78d0ec90915fbc4b57103c664f478ba383ee6a;p=debbugs.git [project @ 2005-07-27 22:51:25 by don] * Return to the previous mailbox download default of showing only the non-boring messages. Boring messages can now be shown by adding &boring=yes to the url. --- diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 8df1db8e..090cc810 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -400,22 +400,23 @@ if ( $mbox ) { print qq(Content-Disposition: attachment; filename="bug_${ref}_message_${msg_num}.mbox"\n); print "Content-Type: message/rfc822\n\n"; } - for my $record (@records) { - next if $record->{type} !~ /^(?:recips|incoming-recv)$/; - my @lines = split( "\n", $record->{text}, -1 ); - if ( $lines[ 1 ] =~ m/^From / ) { - my $tmp = $lines[ 0 ]; - $lines[ 0 ] = $lines[ 1 ]; - $lines[ 1 ] = $tmp; - } - if ( !( $lines[ 0 ] =~ m/^From / ) ) { - my $date = strftime "%a %b %d %T %Y", localtime; - unshift @lines, "From unknown $date"; - } - map { s/^(>*From )/>$1/ } @lines[ 1 .. $#lines ]; - print join( "\n", @lines ) . "\n"; - } - exit 0; + for my $record (@records) { + next if $record->{type} !~ /^(?:recips|incoming-recv)$/; + next if not $boring and $record->{type} eq 'recips'; + my @lines = split( "\n", $record->{text}, -1 ); + if ( $lines[ 1 ] =~ m/^From / ) { + my $tmp = $lines[ 0 ]; + $lines[ 0 ] = $lines[ 1 ]; + $lines[ 1 ] = $tmp; + } + if ( !( $lines[ 0 ] =~ m/^From / ) ) { + my $date = strftime "%a %b %d %T %Y", localtime; + unshift @lines, "From unknown $date"; + } + map { s/^(>*From )/>$1/ } @lines[ 1 .. $#lines ]; + print join( "\n", @lines ) . "\n"; + } + exit 0; } else {