##// END OF EJS Templates
#21 added optional flag to disable gravatar, and use local icon
marcink -
r1110:5351a3a3 beta
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -49,6 +49,7 b' app_instance_uuid = develop'
49 cut_off_limit = 256000
49 cut_off_limit = 256000
50 force_https = false
50 force_https = false
51 commit_parse_limit = 25
51 commit_parse_limit = 25
52 use_gravatar = true
52
53
53 ####################################
54 ####################################
54 ### CELERY CONFIG ####
55 ### CELERY CONFIG ####
@@ -48,6 +48,7 b' index_dir = %(here)s/data/index'
48 cut_off_limit = 256000
48 cut_off_limit = 256000
49 force_https = false
49 force_https = false
50 commit_parse_limit = 250
50 commit_parse_limit = 250
51 use_gravatar = true
51
52
52 ####################################
53 ####################################
53 ### CELERY CONFIG ####
54 ### CELERY CONFIG ####
@@ -49,6 +49,7 b' app_instance_uuid = ${app_instance_uuid}'
49 cut_off_limit = 256000
49 cut_off_limit = 256000
50 force_https = false
50 force_https = false
51 commit_parse_limit = 50
51 commit_parse_limit = 50
52 use_gravatar = true
52
53
53 ####################################
54 ####################################
54 ### CELERY CONFIG ####
55 ### CELERY CONFIG ####
@@ -10,7 +10,7 b' import urllib'
10
10
11 from pygments.formatters import HtmlFormatter
11 from pygments.formatters import HtmlFormatter
12 from pygments import highlight as code_highlight
12 from pygments import highlight as code_highlight
13 from pylons import url, request
13 from pylons import url, request, config
14 from pylons.i18n.translation import _, ungettext
14 from pylons.i18n.translation import _, ungettext
15
15
16 from webhelpers.html import literal, HTML, escape
16 from webhelpers.html import literal, HTML, escape
@@ -35,6 +35,7 b' from webhelpers.html.tags import _set_in'
35
35
36 from vcs.utils.annotate import annotate_highlight
36 from vcs.utils.annotate import annotate_highlight
37 from rhodecode.lib.utils import repo_name_slug
37 from rhodecode.lib.utils import repo_name_slug
38 from rhodecode.lib import str2bool
38
39
39 def _reset(name, value=None, id=NotGiven, type="reset", **attrs):
40 def _reset(name, value=None, id=NotGiven, type="reset", **attrs):
40 """Reset button
41 """Reset button
@@ -562,6 +563,9 b' HasRepoPermissionAny, HasRepoPermissionA'
562 #==============================================================================
563 #==============================================================================
563
564
564 def gravatar_url(email_address, size=30):
565 def gravatar_url(email_address, size=30):
566 if not str2bool(config['app_conf'].get('use_gravatar')):
567 return "/images/user%s.png" % size
568
565 ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme')
569 ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme')
566 default = 'identicon'
570 default = 'identicon'
567 baseurl_nossl = "http://www.gravatar.com/avatar/"
571 baseurl_nossl = "http://www.gravatar.com/avatar/"
General Comments 0
You need to be logged in to leave comments. Login now