X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fbugreport.cgi;h=64547d40a1eceaeb51daa521002b93113c3f1223;hb=ab40da4e4348502384d787bb9deb78da52361d64;hp=83e9b12a2573cc0928b8019793c80ddd7cae76d4;hpb=c7252853ca2b076f3c42d4a73753f9cd47a3c4f4;p=debbugs.git diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 83e9b12..64547d4 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -11,7 +11,7 @@ use IO::File; use Debbugs::Config qw(:globals :text); # for read_log_records -use Debbugs::Log; +use Debbugs::Log qw(read_log_records); use Debbugs::MIME qw(convert_to_utf8 decode_rfc1522 create_mime_message); use Debbugs::CGI qw(:url :html :util); use Debbugs::Common qw(buglog getmaintainers); @@ -125,7 +125,7 @@ sub display_entity ($$$$\$\@) { $$this .= '
[$printname } .
 		  "($type, $disposition)]
\n"; - if ($msg and defined($att) and $att eq $#$attachments) { + if ($msg and defined($att) and $att == $#$attachments) { my $head = $entity->head; chomp(my $type = $entity->effective_type); my $body = $entity->stringify_body; @@ -176,6 +176,12 @@ sub display_entity ($$$$\$\@) { my $body = $entity->bodyhandle->as_string; $body = convert_to_utf8($body,$charset) if defined $charset; $body = html_escape($body); + # Attempt to deal with format=flowed + if ($content_type =~ m/format\s*=\s*\"?flowed\"?/i) { + $body =~ s{^\ }{}mgo; + # we ignore the other things that you can do with + # flowed e-mails cause they don't really matter. + } # Add links to URLs $body =~ s,((ftp|http|https)://[\S~-]+?/?)((\>\;)?[)]?[']?[:.\,]?(\s|$)),$1$3,go; # Add links to bug closures @@ -235,7 +241,7 @@ if (@{$status{found_versions}} or @{$status{fixed_versions}}) { $status{found_versions}, $status{fixed_versions}, ). - q(">version graph$2).qq(">$2).$3.q($4).$5}eo; + if (defined $time) { + $output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') '; + } $output .= 'Full text and rfc822 format available.'; @@ -604,17 +614,22 @@ function toggle_infmessages() END print "

" . "$gProject $gBug report logs - $short" . "
" . $title . "

\n"; - print "$descriptivehead\n"; -print qq(

Reply ), - qq(or subscribe ), - qq(to this bug.

\n); -print qq(

Toggle useless messages

); -printf qq(

View this report as an mbox folder, ). - qq(status mbox, maintainer mbox

\n), - html_escape(bug_url($ref, mbox=>'yes')), - html_escape(bug_url($ref, mbox=>'yes',mboxstatus=>'yes')), - html_escape(bug_url($ref, mbox=>'yes',mboxmaint=>'yes')); + +if (looks_like_number($msg)) { + printf qq(

Full log

),html_escape(bug_url($ref)); +} +else { + print qq(

Reply ), + qq(or subscribe ), + qq(to this bug.

\n); + print qq(

Toggle useless messages

); + printf qq(

View this report as an mbox folder, ). + qq(status mbox, maintainer mbox

\n), + html_escape(bug_url($ref, mbox=>'yes')), + html_escape(bug_url($ref, mbox=>'yes',mboxstatus=>'yes')), + html_escape(bug_url($ref, mbox=>'yes',mboxmaint=>'yes')); +} print "$log"; print "
"; print "

Send a report that this bug log contains spam.

\n
\n";