Browse Source

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>
tags/v1.19.0-rc0
Lunny Xiao 1 year ago
parent
commit
9c8fc7f677
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      models/system/setting.go
  2. 1
    1
      modules/setting/picture.go

+ 1
- 1
models/system/setting.go View File

@@ -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 {

+ 1
- 1
modules/setting/picture.go View File

@@ -68,7 +68,7 @@ func newPictureService() {
}

func GetDefaultDisableGravatar() bool {
return !OfflineMode
return OfflineMode
}

func GetDefaultEnableFederatedAvatar(disableGravatar bool) bool {

Loading…
Cancel
Save