aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-05-27 01:36:33 +0800
committertechknowlogick <techknowlogick@gitea.io>2019-05-26 13:36:33 -0400
commitd67fd69474d2a67e47cbc8106c15c6d217ae8a0d (patch)
treed8dbc6a74b7ff28a9e997ed2a00a47c77c27201b /routers/install.go
parentf3d87da3e24606b770c84d95afeb0789f37a89bd (diff)
downloadgitea-d67fd69474d2a67e47cbc8106c15c6d217ae8a0d.tar.gz
gitea-d67fd69474d2a67e47cbc8106c15c6d217ae8a0d.zip
fix charset was not saved after installation finished (#7048)
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index a404e96b51..cc8be065a8 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -57,6 +57,7 @@ func Install(ctx *context.Context) {
form.DbPasswd = models.DbCfg.Passwd
form.DbName = models.DbCfg.Name
form.DbPath = models.DbCfg.Path
+ form.Charset = models.DbCfg.Charset
ctx.Data["CurDbOption"] = "MySQL"
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("PASSWD").SetValue(models.DbCfg.Passwd)
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("").Key("APP_NAME").SetValue(form.AppName)