summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-01 20:20:04 +0800
committerGitHub <noreply@github.com>2023-01-01 20:20:04 +0800
commitf1e07d8c879aed32d079694d3623f9c6450ee8cd (patch)
tree941504490b61fd18b36775ebbd744184f890592a
parent443fd27a901aceeda203b602d798792fa0927bb7 (diff)
downloadgitea-f1e07d8c879aed32d079694d3623f9c6450ee8cd.tar.gz
gitea-f1e07d8c879aed32d079694d3623f9c6450ee8cd.zip
Fix bug of DisableGravatar default value (#22297)
backport #22296 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
-rw-r--r--models/system/setting.go2
-rw-r--r--modules/setting/picture.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/models/system/setting.go b/models/system/setting.go
index b4011b1b3e..d61b7fdb0f 100644
--- a/models/system/setting.go
+++ b/models/system/setting.go
@@ -267,7 +267,7 @@ func Init() error {
enableFederatedAvatar = false
}
- if disableGravatar || !enableFederatedAvatar {
+ if enableFederatedAvatar || !disableGravatar {
var err error
GravatarSourceURL, err = url.Parse(setting.GravatarSource)
if err != nil {
diff --git a/modules/setting/picture.go b/modules/setting/picture.go
index af9041ade3..4b61d51ac5 100644
--- a/modules/setting/picture.go
+++ b/modules/setting/picture.go
@@ -69,7 +69,7 @@ func newPictureService() {
}
func GetDefaultDisableGravatar() bool {
- return !OfflineMode
+ return OfflineMode
}
func GetDefaultEnableFederatedAvatar(disableGravatar bool) bool {