# HG changeset patch # User Marcin Kuzminski # Date 1299362535 -3600 # Node ID fcb5054937f693bb31efe5ae70c3126078283b5f # Parent 4de3fa6290a737aabb1ddc34275494ad975d5f9a# Parent 5351a3a32381d3f118720d3e9e1a48b4bdc8b85a merge with optional gravatars diff -r 4de3fa6290a7 -r fcb5054937f6 development.ini --- a/development.ini Sat Mar 05 22:59:41 2011 +0100 +++ b/development.ini Sat Mar 05 23:02:15 2011 +0100 @@ -49,6 +49,7 @@ cut_off_limit = 256000 force_https = false commit_parse_limit = 25 +use_gravatar = true #################################### ### CELERY CONFIG #### diff -r 4de3fa6290a7 -r fcb5054937f6 production.ini --- a/production.ini Sat Mar 05 22:59:41 2011 +0100 +++ b/production.ini Sat Mar 05 23:02:15 2011 +0100 @@ -48,6 +48,7 @@ cut_off_limit = 256000 force_https = false commit_parse_limit = 250 +use_gravatar = true #################################### ### CELERY CONFIG #### diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl Sat Mar 05 22:59:41 2011 +0100 +++ b/rhodecode/config/deployment.ini_tmpl Sat Mar 05 23:02:15 2011 +0100 @@ -49,6 +49,7 @@ cut_off_limit = 256000 force_https = false commit_parse_limit = 50 +use_gravatar = true #################################### ### CELERY CONFIG #### diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py Sat Mar 05 22:59:41 2011 +0100 +++ b/rhodecode/lib/helpers.py Sat Mar 05 23:02:15 2011 +0100 @@ -10,7 +10,7 @@ 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 @@ -35,6 +35,7 @@ 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 @@ -565,6 +566,9 @@ #============================================================================== 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/" diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/public/images/user14.png Binary file rhodecode/public/images/user14.png has changed diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/public/images/user20.png Binary file rhodecode/public/images/user20.png has changed diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/public/images/user24.png Binary file rhodecode/public/images/user24.png has changed diff -r 4de3fa6290a7 -r fcb5054937f6 rhodecode/public/images/user30.png Binary file rhodecode/public/images/user30.png has changed