aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-06 16:31:22 -0400
committerUnknwon <u@gogs.io>2015-09-06 16:31:22 -0400
commit85f34ba53843177999cb98bad046e9cce22bfc8f (patch)
treef1f7ca6d3b0fc4848216becd9bc2a25e019cb12e /routers/install.go
parent00767a0522606cd504d81d35fa1d9e9c1e34610c (diff)
downloadgitea-85f34ba53843177999cb98bad046e9cce22bfc8f.tar.gz
gitea-85f34ba53843177999cb98bad046e9cce22bfc8f.zip
new user profile settings UI
Signed-off-by: Unknwon <u@gogs.io>
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/routers/install.go b/routers/install.go
index 72c8b137b0..d9c5d51cac 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -85,7 +85,14 @@ func InstallInit(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("install.install")
ctx.Data["PageIsInstall"] = true
- ctx.Data["DbOptions"] = []string{"MySQL", "PostgreSQL", "SQLite3"}
+ dbOpts := []string{"MySQL", "PostgreSQL"}
+ if models.EnableSQLite3 {
+ dbOpts = append(dbOpts, "SQLite3")
+ }
+ if models.EnableTidb {
+ dbOpts = append(dbOpts, "TiDB")
+ }
+ ctx.Data["DbOptions"] = dbOpts
}
func Install(ctx *middleware.Context) {
@@ -163,7 +170,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
// Pass basic check, now test configuration.
// Test database setting.
- dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "SQLite3": "sqlite3"}
+ dbTypes := map[string]string{"MySQL": "mysql", "PostgreSQL": "postgres", "SQLite3": "sqlite3", "TiDB": "tidb"}
models.DbCfg.Type = dbTypes[form.DbType]
models.DbCfg.Host = form.DbHost
models.DbCfg.User = form.DbUser