Enable SSL gravatars when Redmine is using https. (#2718)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2833 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2009-08-02 04:19:49 +00:00
parent 560e915c50
commit 06ff26f092
1 changed files with 1 additions and 0 deletions

View File

@ -626,6 +626,7 @@ module ApplicationHelper
# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>') # +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')
def avatar(user, options = { }) def avatar(user, options = { })
if Setting.gravatar_enabled? if Setting.gravatar_enabled?
options.merge!({:ssl => Setting.protocol == 'https'})
email = nil email = nil
if user.respond_to?(:mail) if user.respond_to?(:mail)
email = user.mail email = user.mail