提交 2be4fe28 编写于 作者: P Pat Thoyts

Generate consistent gravatar hash values as per documentation.

The gravatar documentation on implementing the hash specifies that leading
and trailing whitespace must be trimmed and all characters should be forced
to lowercase.
Signed-off-by: NPat Thoyts <patthoyts@users.sourceforge.net>
上级 9e6d0710
......@@ -3,7 +3,8 @@ module ApplicationHelper
def gravatar_icon(user_email, size = 40)
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=#{size}&d=identicon"
user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
end
def fixed_mode?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册