diff options
author | Unknwon <u@gogs.io> | 2016-08-07 11:01:47 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-07 11:01:47 -0700 |
commit | 99385db0c418fb49838eb1a23f391cf826d99202 (patch) | |
tree | 9c8fe94489becb5a1909d07156cbb8ed81f69d2f /modules/setting | |
parent | 90dd0657b564210746c9c494c8c5b07dd8eee91f (diff) | |
download | gitea-99385db0c418fb49838eb1a23f391cf826d99202.tar.gz gitea-99385db0c418fb49838eb1a23f391cf826d99202.zip |
#3320 code cleanup
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index b8e8f65ef1..84d78cd512 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -20,8 +20,8 @@ import ( _ "github.com/go-macaron/cache/redis" "github.com/go-macaron/session" _ "github.com/go-macaron/session/redis" - "gopkg.in/ini.v1" "github.com/strk/go-libravatar" + "gopkg.in/ini.v1" "github.com/gogits/gogs/modules/bindata" "github.com/gogits/gogs/modules/log" @@ -141,11 +141,11 @@ var ( } // Picture settings - AvatarUploadPath string - GravatarSource string - DisableGravatar bool - EnableFederatedAvatar bool - LibravatarService *libravatar.Libravatar + AvatarUploadPath string + GravatarSource string + DisableGravatar bool + EnableFederatedAvatar bool + LibravatarService *libravatar.Libravatar // Log settings LogRootPath string @@ -470,8 +470,11 @@ func NewContext() { DisableGravatar = true EnableFederatedAvatar = false } + if DisableGravatar { + EnableFederatedAvatar = false + } - if !DisableGravatar && EnableFederatedAvatar { + if EnableFederatedAvatar { LibravatarService = libravatar.New() parts := strings.Split(GravatarSource, "/") if len(parts) >= 3 { |