Commits

Marcin Kuzminski  committed fcb5054 Merge

merge with optional gravatars

  • Participants
  • Parent commits 4de3fa6, 5351a3a
  • Branches beta

Comments (0)

Files changed (8)

File development.ini

 cut_off_limit = 256000
 force_https = false
 commit_parse_limit = 25
+use_gravatar = true
 
 ####################################
 ###        CELERY CONFIG        ####

File production.ini

 cut_off_limit = 256000
 force_https = false
 commit_parse_limit = 250
+use_gravatar = true
 
 ####################################
 ###        CELERY CONFIG        ####

File rhodecode/config/deployment.ini_tmpl

 cut_off_limit = 256000
 force_https = false 
 commit_parse_limit = 50
+use_gravatar = true
 
 ####################################
 ###        CELERY CONFIG        ####

File rhodecode/lib/helpers.py

 
 from pygments.formatters import HtmlFormatter
 from pygments import highlight as code_highlight
-from pylons import url, request
+from pylons import url, request, config
 from pylons.i18n.translation import _, ungettext
 
 from webhelpers.html import literal, HTML, escape
 
 from vcs.utils.annotate import annotate_highlight
 from rhodecode.lib.utils import repo_name_slug
+from rhodecode.lib import str2bool
 
 def _reset(name, value=None, id=NotGiven, type="reset", **attrs):
     """Reset button
 #==============================================================================
 
 def gravatar_url(email_address, size=30):
+    if not str2bool(config['app_conf'].get('use_gravatar')):
+        return "/images/user%s.png" % size
+
     ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme')
     default = 'identicon'
     baseurl_nossl = "http://www.gravatar.com/avatar/"

File rhodecode/public/images/user14.png

Added
New image

File rhodecode/public/images/user20.png

Added
New image

File rhodecode/public/images/user24.png

Added
New image

File rhodecode/public/images/user30.png

Added
New image