summaryrefslogtreecommitdiffstats
path: root/modules/avatar/avatar.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/avatar/avatar.go')
-rw-r--r--modules/avatar/avatar.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go
index c0a71f11de..73daa213c9 100644
--- a/modules/avatar/avatar.go
+++ b/modules/avatar/avatar.go
@@ -38,10 +38,12 @@ import (
var gravatarSource string
-func init() {
+func UpdateGravatarSource() {
gravatarSource = setting.GravatarSource
+ log.Debug("avatar.UpdateGravatarSource(gavatar source): %s", gravatarSource)
if !strings.HasPrefix(gravatarSource, "http:") {
gravatarSource = "http:" + gravatarSource
+ log.Debug("avatar.UpdateGravatarSource(update gavatar source): %s", gravatarSource)
}
}
@@ -131,11 +133,13 @@ func (this *Avatar) Encode(wr io.Writer, size int) (err error) {
// get image from gravatar.com
func (this *Avatar) Update() {
+ UpdateGravatarSource()
thunder.Fetch(gravatarSource+this.Hash+"?"+this.reqParams,
this.imagePath)
}
func (this *Avatar) UpdateTimeout(timeout time.Duration) (err error) {
+ UpdateGravatarSource()
select {
case <-time.After(timeout):
err = fmt.Errorf("get gravatar image %s timeout", this.Hash)
date-psalm-baseline'>automated/noid/stable30-update-psalm-baseline Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/.jshintrc
blob: 0b055afde3d78bc03ca67136ec21b3ef79bc3bef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
	"camelcase": true,
	"eqeqeq": true,
	"immed": true,
	"latedef": false,
	"noarg": true,
	"nonbsp": true,
	"undef": true,
	"unused": true,
	"trailing": true,
	"maxparams": 5,
	"curly": true,
	"jquery": true,
	"maxlen": 120,
	"indent": 4,
	"browser": true,
	"laxbreak": true,
	"globals": {
		"console": true,
		"it": true,
		"xit": true,
		"expect": true,
		"describe": true,
		"beforeEach": true,
		"afterEach": true,
		"sinon": true,
		"fakeServer": true,
		"_": true,
		"OC": true,
		"OCA": true,
		"t": true,
		"n": true
	}
}