aboutsummaryrefslogtreecommitdiffstats
path: root/models/system
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-01 20:19:23 +0800
committerGitHub <noreply@github.com>2023-01-01 20:19:23 +0800
commit9c8fc7f6773c71019365a0bb66f6686ba7420fb8 (patch)
treec47d3f26b934ad515b5ecb6c0a0f1b7e058110fe /models/system
parent2bbf9e730277e62caa54ac175d93e1570b721db4 (diff)
downloadgitea-9c8fc7f6773c71019365a0bb66f6686ba7420fb8.tar.gz
gitea-9c8fc7f6773c71019365a0bb66f6686ba7420fb8.zip
Fix bug of DisableGravatar default value (#22296)
#18058 made a mistake. The disableGravatar's default value depends on `OfflineMode`. If it's `true`, then `disableGravatar` is true, otherwise it's `false`. But not opposite. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'models/system')
-rw-r--r--models/system/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/system/setting.go b/models/system/setting.go
index dc6145b417..6f333d6fd1 100644
--- a/models/system/setting.go
+++ b/models/system/setting.go
@@ -266,7 +266,7 @@ func Init() error {
enableFederatedAvatar = false
}
- if disableGravatar || !enableFederatedAvatar {
+ if enableFederatedAvatar || !disableGravatar {
var err error
GravatarSourceURL, err = url.Parse(setting.GravatarSource)
if err != nil {