Merged r17150 to 3.3-stable (#26699).

git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@17152 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2018-01-07 22:06:11 +00:00
parent 8072c0dd1e
commit 8f93f08e1c
3 changed files with 12 additions and 3 deletions

View File

@@ -1278,7 +1278,13 @@ module ApplicationHelper
elsif user.to_s =~ %r{<(.+?)>}
email = $1
end
return gravatar(email.to_s.downcase, options) unless email.blank? rescue nil
if email.present?
gravatar(email.to_s.downcase, options) rescue nil
else
image_tag 'anonymous.png',
GravatarHelper::DEFAULT_OPTIONS
.except(:default, :rating, :ssl).merge(options)
end
else
''
end