diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:55:31 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:55:31 +0100 |
commit | b7bf9dfd285a5d64bfcd6a3148c646f03984e594 (patch) | |
tree | f999abb0abee4e69fe57c2bb30ac23fdecab75b4 | |
parent | aadd7dcdc317c5e1665318b537162749514ac212 (diff) | |
download | gitea-b7bf9dfd285a5d64bfcd6a3148c646f03984e594.tar.gz gitea-b7bf9dfd285a5d64bfcd6a3148c646f03984e594.zip |
more
-rw-r--r-- | modules/auth/user_form.go | 4 | ||||
-rw-r--r-- | routers/org/setting.go | 2 | ||||
-rw-r--r-- | routers/user/setting.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 7bd6c7b9bc..09ef53db8f 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -101,8 +101,8 @@ func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) } const ( - AVATAR_LOCAL string = "local" - AVATAR_BYMAIL string = "bymail" + AvatarLocal string = "local" + AvatarByMail string = "bymail" ) type AvatarForm struct { diff --git a/routers/org/setting.go b/routers/org/setting.go index 2169779232..70d5e3e204 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -84,7 +84,7 @@ func SettingsPost(ctx *context.Context, form auth.UpdateOrgSettingForm) { } func SettingsAvatar(ctx *context.Context, form auth.AvatarForm) { - form.Source = auth.AVATAR_LOCAL + form.Source = auth.AvatarLocal if err := user.UpdateAvatarSetting(ctx, form, ctx.Org.Organization); err != nil { ctx.Flash.Error(err.Error()) } else { diff --git a/routers/user/setting.go b/routers/user/setting.go index 35763ab48d..4d698bc2a6 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -104,7 +104,7 @@ func SettingsPost(ctx *context.Context, form auth.UpdateProfileForm) { // FIXME: limit size. func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *models.User) error { - ctxUser.UseCustomAvatar = form.Source == auth.AVATAR_LOCAL + ctxUser.UseCustomAvatar = form.Source == auth.AvatarLocal if len(form.Gravatar) > 0 { ctxUser.Avatar = base.EncodeMD5(form.Gravatar) ctxUser.AvatarEmail = form.Gravatar |