X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FBugreport.pm;h=59d88b07f5dedbdcb112574881a2085f084405be;hb=3087ff28c2299057a5e00ee49f025cf736b4b30f;hp=56a8b4023ee9983208fe40f916fcc2884ba5b66c;hpb=faa25bd6ba58375ba6c28bd7b66b463c21372f06;p=debbugs.git
diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm
index 56a8b402..59d88b07 100644
--- a/Debbugs/CGI/Bugreport.pm
+++ b/Debbugs/CGI/Bugreport.pm
@@ -141,7 +141,10 @@ sub display_entity {
my $head_field = $head->get($_);
next unless defined $head_field and $head_field ne '';
if ($_ eq 'From') {
- push @headers,q();
+ my $libravatar_url = __libravatar_url(decode_rfc1522($head_field));
+ if (defined $libravatar_url and length $libravatar_url) {
+ push @headers,q(
);
+ }
}
push @headers, qq(
$_: ) . html_escape(decode_rfc1522($head_field))."
"; } @@ -432,8 +435,11 @@ sub handle_record{ sub __libravatar_url { my ($email) = @_; + if (not defined $config{libravatar_uri} or not length $config{libravatar_uri}) { + return undef; + } ($email) = get_addresses($email); - return "http://cdn.libravatar.org/avatar/".md5_hex(lc($email))."?d=retro"; + return $config{libravatar_uri}.md5_hex(lc($email)).($config{libravatar_uri_options}//''); }