From 09331ec432bc0b3b308ecd4f44e39dcccf670eb7 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 20 Sep 2010 02:55:14 +0000 Subject: [PATCH] Turn on ssl Gravatars for all SSL requests. #5929 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Contributed by Felix Schäfer git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4103 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index eecbc5b91..6ba40eb45 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -829,7 +829,7 @@ module ApplicationHelper # +user+ can be a User or a string that will be scanned for an email address (eg. 'joe ') def avatar(user, options = { }) if Setting.gravatar_enabled? - options.merge!({:ssl => Setting.protocol == 'https', :default => Setting.gravatar_default}) + options.merge!({:ssl => (defined?(request) && request.ssl?), :default => Setting.gravatar_default}) email = nil if user.respond_to?(:mail) email = user.mail -- 2.39.5