summaryrefslogtreecommitdiffstats
path: root/extensions/Gravatar/Extension.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Gravatar/Extension.pm')
-rw-r--r--extensions/Gravatar/Extension.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/Gravatar/Extension.pm b/extensions/Gravatar/Extension.pm
index e30e921c1..52bbd3d08 100644
--- a/extensions/Gravatar/Extension.pm
+++ b/extensions/Gravatar/Extension.pm
@@ -20,16 +20,17 @@ BEGIN {
}
sub _user_gravatar {
- my ($self) = @_;
+ my ($self, $size) = @_;
if (!$self->{gravatar}) {
if ($self->setting('show_my_gravatar') eq 'On') {
(my $email = $self->email) =~ s/\+(.*?)\@/@/;
- $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?size=64&d=mm';
+ $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?d=mm';
} else {
$self->{gravatar} = 'extensions/Gravatar/web/default.jpg';
}
}
- return $self->{gravatar};
+ $size ||= 64;
+ return $self->{gravatar} . "&size=$size";
}
sub install_before_final_checks {