Added an option to turn user Gravatars on or off

* Option can be found in Administration > General, called
  "Use Gravatar user icons"
* Defaulting Gravatars to off
* Added a helper gravatar_for_mail to check the setting before rendering
  the Gravatar.

  #1776


git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1972 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2008-10-31 00:41:28 +00:00
parent 048fa5bd77
commit ba20a67873
9 changed files with 21 additions and 10 deletions
+6
View File
@@ -561,6 +561,12 @@ module ApplicationHelper
(@has_content && @has_content[name]) || false
end
def gravatar_for_mail(mail, options = { })
if Setting.gravatar_enabled?
return gravatar(mail, options) rescue nil
end
end
private
def wiki_helper