diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-05 13:08:01 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-05 13:08:01 -0400 |
commit | c1eb4d894a092aed1b87ddf5f80ee824fd56789d (patch) | |
tree | b58beee7c762cbbb1cec524c16471788820609b6 /routers/install.go | |
parent | 5f653898f3b39669ce9dbf0ee2263c391695019d (diff) | |
download | gitea-c1eb4d894a092aed1b87ddf5f80ee824fd56789d.tar.gz gitea-c1eb4d894a092aed1b87ddf5f80ee824fd56789d.zip |
Clean api code
Diffstat (limited to 'routers/install.go')
-rw-r--r-- | routers/install.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/install.go b/routers/install.go index 38bf896f4e..53ce90d5b6 100644 --- a/routers/install.go +++ b/routers/install.go @@ -78,7 +78,7 @@ func Install(ctx *middleware.Context, form auth.InstallForm) { ctx.Data["Title"] = "Install" ctx.Data["PageIsInstall"] = true - // Get and assign value to install form. + // Get and assign values to install form. if len(form.Host) == 0 { form.Host = models.DbCfg.Host } @@ -109,11 +109,11 @@ func Install(ctx *middleware.Context, form auth.InstallForm) { } renderDbOption(ctx) - curDbValue := "" + curDbOp := "" if models.EnableSQLite3 { - curDbValue = "SQLite3" // Default when enabled. + curDbOp = "SQLite3" // Default when enabled. } - ctx.Data["CurDbValue"] = curDbValue + ctx.Data["CurDbOption"] = curDbOp auth.AssignForm(form, ctx.Data) ctx.HTML(200, "install") @@ -129,7 +129,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) { ctx.Data["PageIsInstall"] = true renderDbOption(ctx) - ctx.Data["CurDbValue"] = form.Database + ctx.Data["CurDbOption"] = form.Database if ctx.HasError() { ctx.HTML(200, "install") @@ -157,7 +157,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) { if err := models.NewTestEngine(x); err != nil { if strings.Contains(err.Error(), `Unknown database type: sqlite3`) { ctx.RenderWithErr("Your release version does not support SQLite3, please download the official binary version "+ - "from https://github.com/gogits/gogs/wiki/Install-from-binary, NOT the gobuild version.", "install", &form) + "from http://gogs.io/docs/installation/install_from_binary.md, NOT the gobuild version.", "install", &form) } else { ctx.RenderWithErr("Database setting is not correct: "+err.Error(), "install", &form) } |