# HG changeset patch # User Marcin Kuzminski # Date 2011-03-02 10:50:13 # Node ID 5351a3a32381d3f118720d3e9e1a48b4bdc8b85a # Parent 41a695e604ba65f2943cbc7996038c524d692603 #21 added optional flag to disable gravatar, and use local icon diff --git a/development.ini b/development.ini --- a/development.ini +++ b/development.ini @@ -49,6 +49,7 @@ app_instance_uuid = develop cut_off_limit = 256000 force_https = false commit_parse_limit = 25 +use_gravatar = true #################################### ### CELERY CONFIG #### diff --git a/production.ini b/production.ini --- a/production.ini +++ b/production.ini @@ -48,6 +48,7 @@ index_dir = %(here)s/data/index cut_off_limit = 256000 force_https = false commit_parse_limit = 250 +use_gravatar = true #################################### ### CELERY CONFIG #### diff --git a/rhodecode/config/deployment.ini_tmpl b/rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl +++ b/rhodecode/config/deployment.ini_tmpl @@ -49,6 +49,7 @@ app_instance_uuid = ${app_instance_uuid} cut_off_limit = 256000 force_https = false commit_parse_limit = 50 +use_gravatar = true #################################### ### CELERY CONFIG #### diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -10,7 +10,7 @@ import urllib 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 webhelpers.html.tags import _set_in 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 @@ -562,6 +563,9 @@ HasRepoPermissionAny, HasRepoPermissionA #============================================================================== 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 --git a/rhodecode/public/images/user14.png b/rhodecode/public/images/user14.png new file mode 100644 index 0000000000000000000000000000000000000000..45b48c12ee114b33ee2cab79481e293ee6157616 GIT binary patch literal 329 zc$@)A0k-~$P)|#!v5C`11s-%IS?5Y_x0~@J%nT9v z%GK=WTxmY$x)($QGsAn&`FsZ8@p$lhy-F>I?lAyjjHHxM{rtJEE8{rwd_F5=cf`6} zE@cQnRk>cTU--_<$j^IE(=_ZgGvjnR5kjc6YU8@DY};1+W;8S7{eD-saJeCypXa&q zA|l-HceZV-Jsz>OfH4N_vmFix)O8IZ1dK5-#-Q(e+-^6! z2LK|ncw1pec03+Y*EQTY5n;F6AxRQkuU8MlzToQIS!P*=s;Z)GZMR!UDLowfp2{5D zY&Kp}xZIr3M5yxIEW@?{K!~vxmqYMu7(hfAh9OGC`^V!ki4)P-vJ28$Lu-xjFqiCp zzt6@!QQXommy1^g+b|3`pU)G_tSGK6mrK0g?};F<*9%#e#b8rW0ARo0qw6{pMKOsL zMS-sCpp=69C@f)kIjgEd(=;B*+#H*xv3GSM3J+IGiMDO+J|+r(+qT7OwetRZq9~=j z`}NC&5Kv0lwmnhOG(}mK(bo}MWmzIglJO88XrAZM7xK-B2zj25giIo(vV0r#dAkTAj(baDkZT!06*F!oXVvND}eK?K-07#Mq*XtFp*X!$ABhPaX zQF(G*d!C2oa*2MwkLuhk%dp??ak*Sjm@MK|&Dv5FLSVDmpx5gual@#D7K?>;JrU`vh;t6dalTfOX_^p1DC33JBC>6}@zRszVV30fxh&GS2F?J)6zS|6jUp?FS;)b-_7TTzo@RXxp~ox~?8kkz!lf z=?-q%1E^Jz5TfUxF(D(leeT3?v=qY+DiVBm`{U2g6=bZEZJ1{ioJ!kjs-n%5L z)rv93KnQ^d{!BGj2iZo)K^bE|BNb8IoK9SK<*i!oMNjrfc)hUs)#D=H!g z0?cN!MsESYQh6*sb6pps(Wp_BV>lfC_Fo4}7LvuID1v2~mpdT@Q52OpYK3(WS8v+E zdc9s{F|CD7y%iT_Vnam(UaR8oEX$09MPym_Uki<27%A*2+V>-7qt8fH23MO?2} zWzQBzV@z(h8y=5GNw5x#F{EjV%jMEU`>kWq1KAVC820-;@;q0Hi}yuQV7J?$C<$P^j-|sgzn+@*wy9uRP%LKk{@%4Ja^E~Bznx>Wf& zinEkllv22^+v=0W1g`6XQd%u1;G0yAH0l;ybQaSwtM+(9%b`#6I00000 LNkvXXu0mjff(AGK