-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Update settings table on install #22326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,8 +148,8 @@ func Install(ctx *context.Context) { | |
|
||
// Server and other services settings | ||
form.OfflineMode = setting.OfflineMode | ||
form.DisableGravatar = false // when installing, there is no database connection so that given a default value | ||
form.EnableFederatedAvatar = false // when installing, there is no database connection so that given a default value | ||
form.DisableGravatar = false // when installing, there is no database connection so that given a default value | ||
form.EnableFederatedAvatar = !setting.InstallLock // when installing, there is no database connection so that given a default value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, could it make sense to completely DROP the setting frmo the install screen ? Isn't it confusing to set in-db thing from there ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imo since it has been configurable in the past we should try to keep it here. |
||
|
||
form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn | ||
form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp | ||
|
@@ -442,10 +442,13 @@ func SubmitInstall(ctx *context.Context) { | |
cfg.Section("server").Key("OFFLINE_MODE").SetValue(fmt.Sprint(form.OfflineMode)) | ||
// if you are reinstalling, this maybe not right because of missing version | ||
if err := system_model.SetSettingNoVersion(system_model.KeyPictureDisableGravatar, strconv.FormatBool(form.DisableGravatar)); err != nil { | ||
ctx.RenderWithErr(ctx.Tr("install.secret_key_failed", err), tplInstall, &form) | ||
ctx.RenderWithErr(ctx.Tr("install.save_config_failed", err), tplInstall, &form) | ||
return | ||
} | ||
if err := system_model.SetSettingNoVersion(system_model.KeyPictureEnableFederatedAvatar, strconv.FormatBool(form.EnableFederatedAvatar)); err != nil { | ||
ctx.RenderWithErr(ctx.Tr("install.save_config_failed", err), tplInstall, &form) | ||
return | ||
} | ||
cfg.Section("picture").Key("ENABLE_FEDERATED_AVATAR").SetValue(fmt.Sprint(form.EnableFederatedAvatar)) | ||
cfg.Section("openid").Key("ENABLE_OPENID_SIGNIN").SetValue(fmt.Sprint(form.EnableOpenIDSignIn)) | ||
cfg.Section("openid").Key("ENABLE_OPENID_SIGNUP").SetValue(fmt.Sprint(form.EnableOpenIDSignUp)) | ||
cfg.Section("service").Key("DISABLE_REGISTRATION").SetValue(fmt.Sprint(form.DisableRegistration)) | ||
|
Uh oh!
There was an error while loading. Please reload this page.