diff options
author | Jan-Gerd Tenberge <janten@gmail.com> | 2015-09-26 20:53:16 +0200 |
---|---|---|
committer | Jan-Gerd Tenberge <janten@gmail.com> | 2015-09-26 20:53:16 +0200 |
commit | 3ef71fa4fbea9a5ecc3c094df39cf4ea2f97dc90 (patch) | |
tree | 9f6d2812099708cc862b84a76bce9871d0d06fa6 /app | |
parent | 4957415e00207e0eae6184237f19bcd7c7401598 (diff) | |
download | gitlab-ce-3ef71fa4fbea9a5ecc3c094df39cf4ea2f97dc90.tar.gz |
Add support for HiDPI displays in gravatar service
Diffstat (limited to 'app')
-rw-r--r-- | app/services/gravatar_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/gravatar_service.rb b/app/services/gravatar_service.rb index 4bee0c26a68..433ecc2df32 100644 --- a/app/services/gravatar_service.rb +++ b/app/services/gravatar_service.rb @@ -1,13 +1,13 @@ class GravatarService include Gitlab::CurrentSettings - def execute(email, size = nil) + def execute(email, size = nil, scale = 2) if current_application_settings.gravatar_enabled? && email.present? size = 40 if size.nil? || size <= 0 sprintf gravatar_url, hash: Digest::MD5.hexdigest(email.strip.downcase), - size: size, + size: size * scale, email: email.strip end end |