Mercurial > kallithea
comparison rhodecode/lib/helpers.py @ 1643:bdb6fbc8265f
implements #293 gravatar link should be disabled when use_gravatar = false
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 31 Oct 2011 23:10:11 +0200 |
parents | 752b0a7b7679 |
children | 82a88013a3fd |
comparison
equal
deleted
inserted
replaced
1642:c0d8171ade36 | 1643:bdb6fbc8265f |
---|---|
452 #============================================================================== | 452 #============================================================================== |
453 # GRAVATAR URL | 453 # GRAVATAR URL |
454 #============================================================================== | 454 #============================================================================== |
455 | 455 |
456 def gravatar_url(email_address, size=30): | 456 def gravatar_url(email_address, size=30): |
457 if not str2bool(config['app_conf'].get('use_gravatar')) or \ | 457 if (not str2bool(config['app_conf'].get('use_gravatar')) or |
458 email_address == 'anonymous@rhodecode.org': | 458 not email_address or email_address == 'anonymous@rhodecode.org'): |
459 return url("/images/user%s.png" % size) | 459 return url("/images/user%s.png" % size) |
460 | 460 |
461 ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme') | 461 ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme') |
462 default = 'identicon' | 462 default = 'identicon' |
463 baseurl_nossl = "http://www.gravatar.com/avatar/" | 463 baseurl_nossl = "http://www.gravatar.com/avatar/" |