chore: addressed spelling errors

This commit is contained in:
Mark Brown 2025-10-16 21:34:37 -04:00
parent 524dd741d4
commit 43320701ef
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -19,13 +19,13 @@ const gravatarSource = "https://secure.gravatar.com/avatar/"
func disableGravatar(t *testing.T) {
err := system_model.SetSettings(t.Context(), map[string]string{setting.Config().Picture.EnableFederatedAvatar.DynKey(): "false"})
assert.NoError(t, err)
// EnableGravatar.SelectFrom == picture.disable_gravatar for backwards compatability; .Value will flip correctly but the true value here is counterintuitive
// EnableGravatar.SelectFrom == picture.disable_gravatar for backwards compatibility; .Value will flip correctly but the true value here is counterintuitive
err = system_model.SetSettings(t.Context(), map[string]string{setting.Config().Picture.EnableGravatar.SelectFromKey(): "true"})
assert.NoError(t, err)
}
func enableGravatar(t *testing.T) {
// EnableGravatar.SelectFrom == picture.disable_gravatar for backwards compatability; .Value will flip correctly but the false value here is counterintuitive
// EnableGravatar.SelectFrom == picture.disable_gravatar for backwards compatibility; .Value will flip correctly but the false value here is counterintuitive
err := system_model.SetSettings(t.Context(), map[string]string{setting.Config().Picture.EnableGravatar.SelectFromKey(): "false"})
assert.NoError(t, err)
setting.GravatarSource = gravatarSource

View File

@ -427,7 +427,7 @@ func SubmitInstall(ctx *context.Context) {
cfg.Section("server").Key("OFFLINE_MODE").SetValue(strconv.FormatBool(form.OfflineMode))
if err := system_model.SetSettings(ctx, map[string]string{
// Form is submitted on install and should use the SelectFrom key for backwards compatability; getting the value will properly invert the boolean
// Form is submitted on install and should use the SelectFrom key for backwards compatibility; getting the value will properly invert the boolean
setting.Config().Picture.EnableGravatar.SelectFromKey(): strconv.FormatBool(!form.EnableGravatar),
setting.Config().Picture.EnableFederatedAvatar.DynKey(): strconv.FormatBool(form.EnableFederatedAvatar),
}); err != nil {