|
|
@ -149,19 +149,9 @@ func Install(ctx *context.Context) { |
|
|
|
|
|
|
|
|
|
|
|
// Server and other services settings
|
|
|
|
// Server and other services settings
|
|
|
|
form.OfflineMode = setting.OfflineMode |
|
|
|
form.OfflineMode = setting.OfflineMode |
|
|
|
disableGravatarSetting, _ := system_model.GetSetting(system_model.KeyPictureDisableGravatar) |
|
|
|
form.DisableGravatar = false // when installing, there is no database connection so that given a default value
|
|
|
|
if disableGravatarSetting != nil { |
|
|
|
form.EnableFederatedAvatar = false // when installing, there is no database connection so that given a default value
|
|
|
|
form.DisableGravatar = disableGravatarSetting.GetValueBool() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
form.DisableGravatar = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enableFederatedAvatarSetting, _ := system_model.GetSetting(system_model.KeyPictureEnableFederatedAvatar) |
|
|
|
|
|
|
|
if enableFederatedAvatarSetting != nil { |
|
|
|
|
|
|
|
form.EnableFederatedAvatar = enableFederatedAvatarSetting.GetValueBool() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
form.EnableFederatedAvatar = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn |
|
|
|
form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn |
|
|
|
form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp |
|
|
|
form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp |
|
|
|
form.DisableRegistration = setting.Service.DisableRegistration |
|
|
|
form.DisableRegistration = setting.Service.DisableRegistration |
|
|
@ -385,7 +375,6 @@ func SubmitInstall(ctx *context.Context) { |
|
|
|
ctx.RenderWithErr(ctx.Tr("install.invalid_db_setting", err), tplInstall, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("install.invalid_db_setting", err), tplInstall, &form) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
db.UnsetDefaultEngine() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Save settings.
|
|
|
|
// Save settings.
|
|
|
|
cfg := ini.Empty() |
|
|
|
cfg := ini.Empty() |
|
|
@ -518,6 +507,9 @@ func SubmitInstall(ctx *context.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// unset default engine before reload database setting
|
|
|
|
|
|
|
|
db.UnsetDefaultEngine() |
|
|
|
|
|
|
|
|
|
|
|
// ---- All checks are passed
|
|
|
|
// ---- All checks are passed
|
|
|
|
|
|
|
|
|
|
|
|
// Reload settings (and re-initialize database connection)
|
|
|
|
// Reload settings (and re-initialize database connection)
|
|
|
|