mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-16 07:59:11 +00:00
fix charset was not saved after installation finished (#7048)
This commit is contained in:
parent
f3d87da3e2
commit
d67fd69474
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,7 @@ func Install(ctx *context.Context) {
|
||||||
form.DbPasswd = models.DbCfg.Passwd
|
form.DbPasswd = models.DbCfg.Passwd
|
||||||
form.DbName = models.DbCfg.Name
|
form.DbName = models.DbCfg.Name
|
||||||
form.DbPath = models.DbCfg.Path
|
form.DbPath = models.DbCfg.Path
|
||||||
|
form.Charset = models.DbCfg.Charset
|
||||||
|
|
||||||
ctx.Data["CurDbOption"] = "MySQL"
|
ctx.Data["CurDbOption"] = "MySQL"
|
||||||
switch models.DbCfg.Type {
|
switch models.DbCfg.Type {
|
||||||
|
@ -246,6 +247,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
|
||||||
cfg.Section("database").Key("USER").SetValue(models.DbCfg.User)
|
cfg.Section("database").Key("USER").SetValue(models.DbCfg.User)
|
||||||
cfg.Section("database").Key("PASSWD").SetValue(models.DbCfg.Passwd)
|
cfg.Section("database").Key("PASSWD").SetValue(models.DbCfg.Passwd)
|
||||||
cfg.Section("database").Key("SSL_MODE").SetValue(models.DbCfg.SSLMode)
|
cfg.Section("database").Key("SSL_MODE").SetValue(models.DbCfg.SSLMode)
|
||||||
|
cfg.Section("database").Key("CHARSET").SetValue(models.DbCfg.Charset)
|
||||||
cfg.Section("database").Key("PATH").SetValue(models.DbCfg.Path)
|
cfg.Section("database").Key("PATH").SetValue(models.DbCfg.Path)
|
||||||
|
|
||||||
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)
|
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)
|
||||||
|
|
Loading…
Reference in a new issue