Show More
@@ -692,6 +692,10 HasRepoPermissionAny, HasRepoPermissionA | |||||
692 | #============================================================================== |
|
692 | #============================================================================== | |
693 |
|
693 | |||
694 | def gravatar_url(email_address, size=30): |
|
694 | def gravatar_url(email_address, size=30): | |
|
695 | if(config['app_conf'].get('alternative_gravatar')): | |||
|
696 | if(str2bool(config['app_conf'].get('alternative_gravatar_hash'))): | |||
|
697 | email_address = hashlib.md5(email_address.lower()).hexdigest() | |||
|
698 | return "%s/%s?s=%s" % (config['app_conf'].get('alternative_gravatar').strip('/'), email_address, size) | |||
695 | if (not str2bool(config['app_conf'].get('use_gravatar')) or |
|
699 | if (not str2bool(config['app_conf'].get('use_gravatar')) or | |
696 | not email_address or email_address == 'anonymous@rhodecode.org'): |
|
700 | not email_address or email_address == 'anonymous@rhodecode.org'): | |
697 | f = lambda a, l: min(l, key=lambda x: abs(x - a)) |
|
701 | f = lambda a, l: min(l, key=lambda x: abs(x - a)) |
General Comments 0
You need to be logged in to leave comments.
Login now