From 5b78d0ec90915fbc4b57103c664f478ba383ee6a Mon Sep 17 00:00:00 2001 From: don <> Date: Wed, 27 Jul 2005 21:51:25 -0800 Subject: [PATCH] [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. --- cgi/bugreport.cgi | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) 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 { -- 2.39.5