X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FBugreport.pm;h=b3f4ec6defafd3cb7287029ba9859abbc8d72743;hb=507e7fb021c286bcb59d961f9f25c89410d451a2;hp=d4800cd3c7df1f0440962f20c49d457eec8d491a;hpb=77e37a756d57657710291a3a6a99e9d77ea468b5;p=debbugs.git diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index d4800cd..b3f4ec6 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -113,6 +113,9 @@ sub display_entity { trim_headers => {type => BOOLEAN, default => 1, }, + avatars => {type => BOOLEAN, + default => 1, + }, } ); @@ -142,7 +145,7 @@ sub display_entity { my $head_field = $head->get($_); next unless defined $head_field and $head_field ne ''; chomp $head_field; - if ($_ eq 'From') { + if ($_ eq 'From' and $param{avatars}) { my $libravatar_url = __libravatar_url(decode_rfc1522($head_field)); if (defined $libravatar_url and length $libravatar_url) { push @headers,q(\n); @@ -221,6 +224,7 @@ sub display_entity { terse => $param{terse}, exists $param{msg}?(msg=>$param{msg}):(), exists $param{att}?(att=>$param{att}):(), + exists $param{avatars}?(avatars=>$param{avatars}):(), ); # print {$output} "\n"; } @@ -240,6 +244,7 @@ sub display_entity { terse => $param{terse}, exists $param{msg}?(msg=>$param{msg}):(), exists $param{att}?(att=>$param{att}):(), + exists $param{avatars}?(avatars=>$param{avatars}):(), ); # print {$output} "\n"; } @@ -319,6 +324,7 @@ sub handle_email_message{ exists $param{msg}?(msg=>$param{msg}):(), exists $param{att}?(att=>$param{att}):(), exists $param{trim_headers}?(trim_headers=>$param{trim_headers}):(), + exists $param{avatars}?(avatars=>$param{avatars}):(), ); return decode_utf8($output); } @@ -334,7 +340,7 @@ should be output to the browser. =cut sub handle_record{ - my ($record,$bug_number,$msg_number,$seen_msg_ids) = @_; + my ($record,$bug_number,$msg_number,$seen_msg_ids,%param) = @_; # output needs to have the is_utf8 flag on to avoid double # encoding @@ -397,6 +403,7 @@ sub handle_record{ $output .= handle_email_message($record->{text}, ref => $bug_number, msg_num => $msg_number, + %param, ); } elsif (/autocheck/) { @@ -424,6 +431,7 @@ sub handle_record{ $output .= handle_email_message($record->{text}, ref => $bug_number, msg_num => $msg_number, + %param, ); } else {